<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>GHC.Core.Type</title><link href="linuwial.css" rel="stylesheet" type="text/css" title="Linuwial" /><link rel="stylesheet" type="text/css" href="quick-jump.css" /><link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" /><script src="haddock-bundle.min.js" async="async" type="text/javascript"></script><script type="text/x-mathjax-config">MathJax.Hub.Config({ tex2jax: { processClass: "mathjax", ignoreClass: ".*" } });</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script></head><body><div id="package-header"><span class="caption">ghc-9.0.2: The GHC API</span><ul class="links" id="page-menu"><li><a href="src/GHC.Core.Type.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">GHC.Core.Type</p></div><div id="table-of-contents"><div id="contents-list"><p class="caption" onclick="window.scrollTo(0,0)">Contents</p><ul><li><a href="#g:1">Main data types representing Types</a><ul><li><a href="#g:2">Constructing and deconstructing types</a></li><li><a href="#g:3">Analyzing types</a></li><li><a href="#g:4">Binders</a></li><li><a href="#g:5">Common type constructors</a></li><li><a href="#g:6">Predicates on types</a><ul><li><a href="#g:7">Levity and boxity</a></li></ul></li></ul></li><li><a href="#g:8">Multiplicity</a></li><li><a href="#g:9">Main data types representing Kinds</a><ul><li><a href="#g:10">Finding the kind of a type</a></li><li><a href="#g:11">Common Kind</a></li></ul></li><li><a href="#g:12">Type free variables</a><ul><li><a href="#g:13">Closing over kinds</a></li></ul></li><li><a href="#g:14">Well-scoped lists of variables</a></li><li><a href="#g:15">Type comparison</a></li><li><a href="#g:16">Forcing evaluation of types</a></li><li><a href="#g:17">Other views onto Types</a></li><li><a href="#g:18">Main type substitution data types</a><ul><li><a href="#g:19">Manipulating type substitutions</a></li><li><a href="#g:20">Performing substitution on types and kinds</a></li></ul></li><li><a href="#g:21">Tidying type related things up for printing</a></li><li><a href="#g:22">Kinds</a></li></ul></div></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Main functions for manipulating types and type-related things</p></div></div><div id="synopsis"><details id="syn"><summary>Synopsis</summary><ul class="details-toggle" data-details-id="syn"><li class="src short"><span class="keyword">data</span> <a href="#t:TyThing">TyThing</a><ul class="subs"><li>= <a href="#v:AnId">AnId</a> <a href="GHC-Types-Var.html#t:Id" title="GHC.Types.Var">Id</a></li><li>| <a href="#v:AConLike">AConLike</a> <a href="GHC-Core-ConLike.html#t:ConLike" title="GHC.Core.ConLike">ConLike</a></li><li>| <a href="#v:ATyCon">ATyCon</a> <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></li><li>| <a href="#v:ACoAxiom">ACoAxiom</a> (<a href="GHC-Core-Coercion-Axiom.html#t:CoAxiom" title="GHC.Core.Coercion.Axiom">CoAxiom</a> <a href="GHC-Core-Coercion-Axiom.html#t:Branched" title="GHC.Core.Coercion.Axiom">Branched</a>)</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Type">Type</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ArgFlag">ArgFlag</a> <span class="keyword">where</span><ul class="subs"><li><a href="#v:Invisible">Invisible</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a></li><li><a href="#v:Required">Required</a></li><li><span class="keyword">pattern</span> <a href="#v:Specified">Specified</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></li><li><span class="keyword">pattern</span> <a href="#v:Inferred">Inferred</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:AnonArgFlag">AnonArgFlag</a><ul class="subs"><li>= <a href="#v:VisArg">VisArg</a></li><li>| <a href="#v:InvisArg">InvisArg</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Specificity">Specificity</a><ul class="subs"><li>= <a href="#v:InferredSpec">InferredSpec</a></li><li>| <a href="#v:SpecifiedSpec">SpecifiedSpec</a></li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:KindOrType">KindOrType</a> = <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:PredType">PredType</a> = <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ThetaType">ThetaType</a> = [<a href="GHC-Core-Type.html#t:PredType" title="GHC.Core.Type">PredType</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:Var">Var</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:TyVar">TyVar</a> = <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></li><li class="src short"><a href="#v:isTyVar">isTyVar</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:TyCoVar">TyCoVar</a> = <a href="GHC-Types-Var.html#t:Id" title="GHC.Types.Var">Id</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:TyCoBinder">TyCoBinder</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:TyCoVarBinder">TyCoVarBinder</a> = <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:TyVarBinder">TyVarBinder</a> = <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Mult">Mult</a> = <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Scaled">Scaled</a> a</li><li class="src short"><span class="keyword">type</span> <a href="#t:KnotTied">KnotTied</a> ty = ty</li><li class="src short"><a href="#v:mkTyVarTy">mkTyVarTy</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkTyVarTys">mkTyVarTys</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:getTyVar">getTyVar</a> :: <a href="GHC-Prelude.html#t:String" title="GHC.Prelude">String</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a></li><li class="src short"><a href="#v:getTyVar_maybe">getTyVar_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a></li><li class="src short"><a href="#v:repGetTyVar_maybe">repGetTyVar_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a></li><li class="src short"><a href="#v:getCastedTyVar_maybe">getCastedTyVar_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>, <a href="GHC-Core-Coercion.html#t:CoercionN" title="GHC.Core.Coercion">CoercionN</a>)</li><li class="src short"><a href="#v:tyVarKind">tyVarKind</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></li><li class="src short"><a href="#v:varType">varType</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></li><li class="src short"><a href="#v:mkAppTy">mkAppTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkAppTys">mkAppTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:splitAppTy">splitAppTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitAppTys">splitAppTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>])</li><li class="src short"><a href="#v:repSplitAppTys">repSplitAppTys</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>])</li><li class="src short"><a href="#v:splitAppTy_maybe">splitAppTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:repSplitAppTy_maybe">repSplitAppTy_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:tcRepSplitAppTy_maybe">tcRepSplitAppTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:mkVisFunTy">mkVisFunTy</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkInvisFunTy">mkInvisFunTy</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkVisFunTys">mkVisFunTys</a> :: [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkVisFunTyMany">mkVisFunTyMany</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkInvisFunTyMany">mkInvisFunTyMany</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkVisFunTysMany">mkVisFunTysMany</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkInvisFunTysMany">mkInvisFunTysMany</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:splitFunTy">splitFunTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitFunTy_maybe">splitFunTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitFunTys">splitFunTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:funResultTy">funResultTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:funArgTy">funArgTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkTyConApp">mkTyConApp</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkTyConTy">mkTyConTy</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:tyConAppTyCon_maybe">tyConAppTyCon_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></li><li class="src short"><a href="#v:tyConAppTyConPicky_maybe">tyConAppTyConPicky_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></li><li class="src short"><a href="#v:tyConAppArgs_maybe">tyConAppArgs_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:tyConAppTyCon">tyConAppTyCon</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></li><li class="src short"><a href="#v:tyConAppArgs">tyConAppArgs</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:splitTyConApp_maybe">splitTyConApp_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>])</li><li class="src short"><a href="#v:splitTyConApp">splitTyConApp</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>])</li><li class="src short"><a href="#v:tyConAppArgN">tyConAppArgN</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:tcSplitTyConApp_maybe">tcSplitTyConApp_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>])</li><li class="src short"><a href="#v:splitListTyConApp_maybe">splitListTyConApp_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:repSplitTyConApp_maybe">repSplitTyConApp_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>])</li><li class="src short"><a href="#v:mkForAllTy">mkForAllTy</a> :: <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkForAllTys">mkForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyCoVarBinder" title="GHC.Core.Type">TyCoVarBinder</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkInvisForAllTys">mkInvisForAllTys</a> :: [<a href="GHC-Types-Var.html#t:InvisTVBinder" title="GHC.Types.Var">InvisTVBinder</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkTyCoInvForAllTys">mkTyCoInvForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkSpecForAllTy">mkSpecForAllTy</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkSpecForAllTys">mkSpecForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkVisForAllTys">mkVisForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkTyCoInvForAllTy">mkTyCoInvForAllTy</a> :: <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkInfForAllTy">mkInfForAllTy</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkInfForAllTys">mkInfForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:splitForAllTys">splitForAllTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitForAllTysReq">splitForAllTysReq</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Types-Var.html#t:ReqTVBinder" title="GHC.Types.Var">ReqTVBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitForAllTysInvis">splitForAllTysInvis</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Types-Var.html#t:InvisTVBinder" title="GHC.Types.Var">InvisTVBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitForAllVarBndrs">splitForAllVarBndrs</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoVarBinder" title="GHC.Core.Type">TyCoVarBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitForAllTy_maybe">splitForAllTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitForAllTy">splitForAllTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitForAllTy_ty_maybe">splitForAllTy_ty_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitForAllTy_co_maybe">splitForAllTy_co_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitPiTy_maybe">splitPiTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitPiTy">splitPiTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitPiTys">splitPiTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:mkTyConBindersPreferAnon">mkTyConBindersPreferAnon</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a> -&gt; [<a href="GHC-Core-TyCon.html#t:TyConBinder" title="GHC.Core.TyCon">TyConBinder</a>]</li><li class="src short"><a href="#v:mkPiTy">mkPiTy</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkPiTys">mkPiTys</a> :: [<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:piResultTy">piResultTy</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:piResultTys">piResultTys</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:applyTysX">applyTysX</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:dropForAlls">dropForAlls</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkFamilyTyConApp">mkFamilyTyConApp</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:buildSynTyCon">buildSynTyCon</a> :: <a href="GHC-Types-Name.html#t:Name" title="GHC.Types.Name">Name</a> -&gt; [<a href="GHC-Core-Type.html#t:KnotTied" title="GHC.Core.Type">KnotTied</a> <a href="GHC-Core-TyCon.html#t:TyConBinder" title="GHC.Core.TyCon">TyConBinder</a>] -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; [<a href="GHC-Core-TyCon.html#t:Role" title="GHC.Core.TyCon">Role</a>] -&gt; <a href="GHC-Core-Type.html#t:KnotTied" title="GHC.Core.Type">KnotTied</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></li><li class="src short"><a href="#v:mkNumLitTy">mkNumLitTy</a> :: <a href="GHC-Prelude.html#t:Integer" title="GHC.Prelude">Integer</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:isNumLitTy">isNumLitTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Prelude.html#t:Integer" title="GHC.Prelude">Integer</a></li><li class="src short"><a href="#v:mkStrLitTy">mkStrLitTy</a> :: <a href="GHC-Data-FastString.html#t:FastString" title="GHC.Data.FastString">FastString</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:isStrLitTy">isStrLitTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Data-FastString.html#t:FastString" title="GHC.Data.FastString">FastString</a></li><li class="src short"><a href="#v:isLitTy">isLitTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-TyCo-Rep.html#t:TyLit" title="GHC.Core.TyCo.Rep">TyLit</a></li><li class="src short"><a href="#v:isPredTy">isPredTy</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:getRuntimeRep_maybe">getRuntimeRep_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:kindRep_maybe">kindRep_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:kindRep">kindRep</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkCastTy">mkCastTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:mkCoercionTy">mkCoercionTy</a> :: <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:splitCastTy_maybe">splitCastTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>)</li><li class="src short"><a href="#v:userTypeError_maybe">userTypeError_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:pprUserTypeErrorTy">pprUserTypeErrorTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a></li><li class="src short"><a href="#v:coAxNthLHS">coAxNthLHS</a> :: <a href="GHC-Core-Coercion-Axiom.html#t:CoAxiom" title="GHC.Core.Coercion.Axiom">CoAxiom</a> br -&gt; <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:stripCoercionTy">stripCoercionTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a></li><li class="src short"><a href="#v:splitPiTysInvisible">splitPiTysInvisible</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:splitPiTysInvisibleN">splitPiTysInvisibleN</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:invisibleTyBndrCount">invisibleTyBndrCount</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a></li><li class="src short"><a href="#v:filterOutInvisibleTypes">filterOutInvisibleTypes</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:filterOutInferredTypes">filterOutInferredTypes</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:partitionInvisibleTypes">partitionInvisibleTypes</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; ([<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>], [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>])</li><li class="src short"><a href="#v:partitionInvisibles">partitionInvisibles</a> :: [(a, <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>)] -&gt; ([a], [a])</li><li class="src short"><a href="#v:tyConArgFlags">tyConArgFlags</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>]</li><li class="src short"><a href="#v:appTyArgFlags">appTyArgFlags</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>]</li><li class="src short"><a href="#v:synTyConResKind">synTyConResKind</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:TyCoMapper">TyCoMapper</a> env m = <a href="#v:TyCoMapper">TyCoMapper</a> {<ul class="subs"><li><a href="#v:tcm_tyvar">tcm_tyvar</a> :: env -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; m <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li><a href="#v:tcm_covar">tcm_covar</a> :: env -&gt; <a href="GHC-Types-Var.html#t:CoVar" title="GHC.Types.Var">CoVar</a> -&gt; m <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a></li><li><a href="#v:tcm_hole">tcm_hole</a> :: env -&gt; <a href="GHC-Core-Coercion.html#t:CoercionHole" title="GHC.Core.Coercion">CoercionHole</a> -&gt; m <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a></li><li><a href="#v:tcm_tycobinder">tcm_tycobinder</a> :: env -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; m (env, <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>)</li><li><a href="#v:tcm_tycon">tcm_tycon</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; m <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></li></ul>}</li><li class="src short"><a href="#v:mapTyCo">mapTyCo</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; <a href="GHC-Core-Type.html#t:TyCoMapper" title="GHC.Core.Type">TyCoMapper</a> () m -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; m <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; m [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>], <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; m <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>, [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>] -&gt; m [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>])</li><li class="src short"><a href="#v:mapTyCoX">mapTyCoX</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; <a href="GHC-Core-Type.html#t:TyCoMapper" title="GHC.Core.Type">TyCoMapper</a> env m -&gt; (env -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; m <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, env -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; m [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>], env -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; m <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>, env -&gt; [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>] -&gt; m [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>])</li><li class="src short"><span class="keyword">data</span> <a href="#t:TyCoFolder">TyCoFolder</a> env a = <a href="#v:TyCoFolder">TyCoFolder</a> {<ul class="subs"><li><a href="#v:tcf_view">tcf_view</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li><a href="#v:tcf_tyvar">tcf_tyvar</a> :: env -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; a</li><li><a href="#v:tcf_covar">tcf_covar</a> :: env -&gt; <a href="GHC-Types-Var.html#t:CoVar" title="GHC.Types.Var">CoVar</a> -&gt; a</li><li><a href="#v:tcf_hole">tcf_hole</a> :: env -&gt; <a href="GHC-Core-Coercion.html#t:CoercionHole" title="GHC.Core.Coercion">CoercionHole</a> -&gt; a</li><li><a href="#v:tcf_tycobinder">tcf_tycobinder</a> :: env -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; env</li></ul>}</li><li class="src short"><a href="#v:foldTyCo">foldTyCo</a> :: <a href="GHC-Prelude.html#t:Monoid" title="GHC.Prelude">Monoid</a> a =&gt; <a href="GHC-Core-Type.html#t:TyCoFolder" title="GHC.Core.Type">TyCoFolder</a> env a -&gt; env -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; a, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; a, <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; a, [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>] -&gt; a)</li><li class="src short"><a href="#v:newTyConInstRhs">newTyConInstRhs</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:sameVis">sameVis</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:mkTyCoVarBinder">mkTyCoVarBinder</a> :: vis -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis</li><li class="src short"><a href="#v:mkTyCoVarBinders">mkTyCoVarBinders</a> :: vis -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis]</li><li class="src short"><a href="#v:mkTyVarBinder">mkTyVarBinder</a> :: vis -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> vis</li><li class="src short"><a href="#v:mkTyVarBinders">mkTyVarBinders</a> :: vis -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> vis]</li><li class="src short"><a href="#v:tyVarSpecToBinders">tyVarSpecToBinders</a> :: [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> a <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a>] -&gt; [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> a <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>]</li><li class="src short"><a href="#v:mkAnonBinder">mkAnonBinder</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a></li><li class="src short"><a href="#v:isAnonTyCoBinder">isAnonTyCoBinder</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:binderVar">binderVar</a> :: <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv argf -&gt; tv</li><li class="src short"><a href="#v:binderVars">binderVars</a> :: [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv argf] -&gt; [tv]</li><li class="src short"><a href="#v:binderType">binderType</a> :: <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> argf -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:binderArgFlag">binderArgFlag</a> :: <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv argf -&gt; argf</li><li class="src short"><a href="#v:tyCoBinderType">tyCoBinderType</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:tyCoBinderVar_maybe">tyCoBinderVar_maybe</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a></li><li class="src short"><a href="#v:tyBinderType">tyBinderType</a> :: <a href="GHC-Core-TyCo-Rep.html#t:TyBinder" title="GHC.Core.TyCo.Rep">TyBinder</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:binderRelevantType_maybe">binderRelevantType_maybe</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:isVisibleArgFlag">isVisibleArgFlag</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isInvisibleArgFlag">isInvisibleArgFlag</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isVisibleBinder">isVisibleBinder</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isInvisibleBinder">isInvisibleBinder</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isNamedBinder">isNamedBinder</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:tyConBindersTyCoBinders">tyConBindersTyCoBinders</a> :: [<a href="GHC-Core-TyCon.html#t:TyConBinder" title="GHC.Core.TyCon">TyConBinder</a>] -&gt; [<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>]</li><li class="src short"><a href="#v:funTyCon">funTyCon</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></li><li class="src short"><a href="#v:unrestrictedFunTyCon">unrestrictedFunTyCon</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></li><li class="src short"><a href="#v:isTyVarTy">isTyVarTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isFunTy">isFunTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isCoercionTy">isCoercionTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isCoercionTy_maybe">isCoercionTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a></li><li class="src short"><a href="#v:isForAllTy">isForAllTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isForAllTy_ty">isForAllTy_ty</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isForAllTy_co">isForAllTy_co</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isPiTy">isPiTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isTauTy">isTauTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isFamFreeTy">isFamFreeTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isCoVarType">isCoVarType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isAtomicTy">isAtomicTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isValidJoinPointType">isValidJoinPointType</a> :: <a href="GHC-Types-Basic.html#t:JoinArity" title="GHC.Types.Basic">JoinArity</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:tyConAppNeedsKindSig">tyConAppNeedsKindSig</a> :: <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> -&gt; <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isLiftedType_maybe">isLiftedType_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isLiftedTypeKind">isLiftedTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isUnliftedTypeKind">isUnliftedTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isLiftedRuntimeRep">isLiftedRuntimeRep</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isUnliftedRuntimeRep">isUnliftedRuntimeRep</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isUnliftedType">isUnliftedType</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:mightBeUnliftedType">mightBeUnliftedType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isUnboxedTupleType">isUnboxedTupleType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isUnboxedSumType">isUnboxedSumType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isAlgType">isAlgType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isDataFamilyAppType">isDataFamilyAppType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isPrimitiveType">isPrimitiveType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isStrictType">isStrictType</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isRuntimeRepTy">isRuntimeRepTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isRuntimeRepVar">isRuntimeRepVar</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isRuntimeRepKindedTy">isRuntimeRepKindedTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:dropRuntimeRepArgs">dropRuntimeRepArgs</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:getRuntimeRep">getRuntimeRep</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:isMultiplicityTy">isMultiplicityTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isMultiplicityVar">isMultiplicityVar</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:unrestricted">unrestricted</a> :: a -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a</li><li class="src short"><a href="#v:linear">linear</a> :: a -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a</li><li class="src short"><a href="#v:tymult">tymult</a> :: a -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a</li><li class="src short"><a href="#v:mkScaled">mkScaled</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; a -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a</li><li class="src short"><a href="#v:irrelevantMult">irrelevantMult</a> :: <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; a</li><li class="src short"><a href="#v:scaledSet">scaledSet</a> :: <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; b -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> b</li><li class="src short"><span class="keyword">pattern</span> <a href="#v:One">One</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a></li><li class="src short"><span class="keyword">pattern</span> <a href="#v:Many">Many</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a></li><li class="src short"><a href="#v:isOneDataConTy">isOneDataConTy</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isManyDataConTy">isManyDataConTy</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isLinearType">isLinearType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Kind">Kind</a> = <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:typeKind">typeKind</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></li><li class="src short"><a href="#v:tcTypeKind">tcTypeKind</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></li><li class="src short"><a href="#v:isTypeLevPoly">isTypeLevPoly</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:resultIsLevPoly">resultIsLevPoly</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:tcIsLiftedTypeKind">tcIsLiftedTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:tcIsConstraintKind">tcIsConstraintKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:tcReturnsConstraintKind">tcReturnsConstraintKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:tcIsRuntimeTypeKind">tcIsRuntimeTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:liftedTypeKind">liftedTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></li><li class="src short"><a href="#v:tyCoFVsOfType">tyCoFVsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a></li><li class="src short"><a href="#v:tyCoFVsBndr">tyCoFVsBndr</a> :: <a href="GHC-Core-Type.html#t:TyCoVarBinder" title="GHC.Core.Type">TyCoVarBinder</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a></li><li class="src short"><a href="#v:tyCoFVsVarBndr">tyCoFVsVarBndr</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a></li><li class="src short"><a href="#v:tyCoFVsVarBndrs">tyCoFVsVarBndrs</a> :: [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a></li><li class="src short"><a href="#v:tyCoVarsOfType">tyCoVarsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a></li><li class="src short"><a href="#v:tyCoVarsOfTypes">tyCoVarsOfTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a></li><li class="src short"><a href="#v:tyCoVarsOfTypeDSet">tyCoVarsOfTypeDSet</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Types-Var-Set.html#t:DTyCoVarSet" title="GHC.Types.Var.Set">DTyCoVarSet</a></li><li class="src short"><a href="#v:coVarsOfType">coVarsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Types-Var-Set.html#t:CoVarSet" title="GHC.Types.Var.Set">CoVarSet</a></li><li class="src short"><a href="#v:coVarsOfTypes">coVarsOfTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Types-Var-Set.html#t:CoVarSet" title="GHC.Types.Var.Set">CoVarSet</a></li><li class="src short"><a href="#v:noFreeVarsOfType">noFreeVarsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:splitVisVarsOfType">splitVisVarsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Data-Pair.html#t:Pair" title="GHC.Data.Pair">Pair</a> <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a></li><li class="src short"><a href="#v:splitVisVarsOfTypes">splitVisVarsOfTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Data-Pair.html#t:Pair" title="GHC.Data.Pair">Pair</a> <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a></li><li class="src short"><a href="#v:expandTypeSynonyms">expandTypeSynonyms</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:typeSize">typeSize</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a></li><li class="src short"><a href="#v:occCheckExpand">occCheckExpand</a> :: [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:closeOverKindsDSet">closeOverKindsDSet</a> :: <a href="GHC-Types-Var-Set.html#t:DTyVarSet" title="GHC.Types.Var.Set">DTyVarSet</a> -&gt; <a href="GHC-Types-Var-Set.html#t:DTyVarSet" title="GHC.Types.Var.Set">DTyVarSet</a></li><li class="src short"><a href="#v:closeOverKindsList">closeOverKindsList</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>]</li><li class="src short"><a href="#v:closeOverKinds">closeOverKinds</a> :: <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a> -&gt; <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a></li><li class="src short"><a href="#v:scopedSort">scopedSort</a> :: [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>]</li><li class="src short"><a href="#v:tyCoVarsOfTypeWellScoped">tyCoVarsOfTypeWellScoped</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>]</li><li class="src short"><a href="#v:tyCoVarsOfTypesWellScoped">tyCoVarsOfTypesWellScoped</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>]</li><li class="src short"><a href="#v:eqType">eqType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:eqTypeX">eqTypeX</a> :: <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:eqTypes">eqTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:nonDetCmpType">nonDetCmpType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a></li><li class="src short"><a href="#v:nonDetCmpTypes">nonDetCmpTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a></li><li class="src short"><a href="#v:nonDetCmpTypeX">nonDetCmpTypeX</a> :: <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a></li><li class="src short"><a href="#v:nonDetCmpTypesX">nonDetCmpTypesX</a> :: <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a></li><li class="src short"><a href="#v:nonDetCmpTc">nonDetCmpTc</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a></li><li class="src short"><a href="#v:eqVarBndrs">eqVarBndrs</a> :: <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a> -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a></li><li class="src short"><a href="#v:seqType">seqType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ()</li><li class="src short"><a href="#v:seqTypes">seqTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; ()</li><li class="src short"><a href="#v:coreView">coreView</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:tcView">tcView</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:tyConsOfType">tyConsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Types-Unique-Set.html#t:UniqSet" title="GHC.Types.Unique.Set">UniqSet</a> <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:TvSubstEnv">TvSubstEnv</a> = <a href="GHC-Types-Var-Env.html#t:TyVarEnv" title="GHC.Types.Var.Env">TyVarEnv</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:TCvSubst">TCvSubst</a> = <a href="#v:TCvSubst">TCvSubst</a> <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a> <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a> <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a></li><li class="src short"><a href="#v:emptyTvSubstEnv">emptyTvSubstEnv</a> :: <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a></li><li class="src short"><a href="#v:emptyTCvSubst">emptyTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:mkEmptyTCvSubst">mkEmptyTCvSubst</a> :: <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:mkTCvSubst">mkTCvSubst</a> :: <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a> -&gt; (<a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a>, <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a>) -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:zipTvSubst">zipTvSubst</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:mkTvSubstPrs">mkTvSubstPrs</a> :: [(<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:zipTCvSubst">zipTCvSubst</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:notElemTCvSubst">notElemTCvSubst</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:getTvSubstEnv">getTvSubstEnv</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a></li><li class="src short"><a href="#v:setTvSubstEnv">setTvSubstEnv</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:zapTCvSubst">zapTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:getTCvInScope">getTCvInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a></li><li class="src short"><a href="#v:getTCvSubstRangeFVs">getTCvSubstRangeFVs</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Types-Var-Set.html#t:VarSet" title="GHC.Types.Var.Set">VarSet</a></li><li class="src short"><a href="#v:extendTCvInScope">extendTCvInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTCvInScopeList">extendTCvInScopeList</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTCvInScopeSet">extendTCvInScopeSet</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Types-Var-Set.html#t:VarSet" title="GHC.Types.Var.Set">VarSet</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTCvSubst">extendTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendCvSubst">extendCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Types-Var.html#t:CoVar" title="GHC.Types.Var">CoVar</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTvSubst">extendTvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTvSubstBinderAndInScope">extendTvSubstBinderAndInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTvSubstList">extendTvSubstList</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTvSubstAndInScope">extendTvSubstAndInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTCvSubstList">extendTCvSubstList</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTvSubstWithClone">extendTvSubstWithClone</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:extendTCvSubstWithClone">extendTCvSubstWithClone</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:isInScope">isInScope</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:composeTCvSubstEnv">composeTCvSubstEnv</a> :: <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a> -&gt; (<a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a>, <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a>) -&gt; (<a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a>, <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a>) -&gt; (<a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a>, <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a>)</li><li class="src short"><a href="#v:composeTCvSubst">composeTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:zipTyEnv">zipTyEnv</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a></li><li class="src short"><a href="#v:zipCoEnv">zipCoEnv</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; [<a href="GHC-Types-Var.html#t:CoVar" title="GHC.Types.Var">CoVar</a>] -&gt; [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>] -&gt; <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a></li><li class="src short"><a href="#v:isEmptyTCvSubst">isEmptyTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:unionTCvSubst">unionTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></li><li class="src short"><a href="#v:substTy">substTy</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:substTys">substTys</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:substScaledTy">substScaledTy</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:substScaledTys">substScaledTys</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:substTyWith">substTyWith</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:substTysWith">substTysWith</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:substTheta">substTheta</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a> -&gt; <a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a></li><li class="src short"><a href="#v:substTyAddInScope">substTyAddInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:substTyUnchecked">substTyUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:substTysUnchecked">substTysUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:substScaledTyUnchecked">substScaledTyUnchecked</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:substScaledTysUnchecked">substScaledTysUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:substThetaUnchecked">substThetaUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a> -&gt; <a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a></li><li class="src short"><a href="#v:substTyWithUnchecked">substTyWithUnchecked</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:substCoUnchecked">substCoUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a></li><li class="src short"><a href="#v:substCoWithUnchecked">substCoWithUnchecked</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a></li><li class="src short"><a href="#v:substTyVarBndr">substTyVarBndr</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>)</li><li class="src short"><a href="#v:substTyVarBndrs">substTyVarBndrs</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>])</li><li class="src short"><a href="#v:substTyVar">substTyVar</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:substTyVars">substTyVars</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:substVarBndr">substVarBndr</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>)</li><li class="src short"><a href="#v:substVarBndrs">substVarBndrs</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>])</li><li class="src short"><a href="#v:cloneTyVarBndr">cloneTyVarBndr</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Types-Unique.html#t:Unique" title="GHC.Types.Unique">Unique</a> -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>)</li><li class="src short"><a href="#v:cloneTyVarBndrs">cloneTyVarBndrs</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Types-Unique-Supply.html#t:UniqSupply" title="GHC.Types.Unique.Supply">UniqSupply</a> -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>])</li><li class="src short"><a href="#v:lookupTyVar">lookupTyVar</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:tidyType">tidyType</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:tidyTypes">tidyTypes</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]</li><li class="src short"><a href="#v:tidyOpenType">tidyOpenType</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)</li><li class="src short"><a href="#v:tidyOpenTypes">tidyOpenTypes</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>])</li><li class="src short"><a href="#v:tidyOpenKind">tidyOpenKind</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a>)</li><li class="src short"><a href="#v:tidyVarBndr">tidyVarBndr</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>)</li><li class="src short"><a href="#v:tidyVarBndrs">tidyVarBndrs</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>])</li><li class="src short"><a href="#v:tidyFreeTyCoVars">tidyFreeTyCoVars</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a></li><li class="src short"><a href="#v:tidyOpenTyCoVar">tidyOpenTyCoVar</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>)</li><li class="src short"><a href="#v:tidyOpenTyCoVars">tidyOpenTyCoVars</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>])</li><li class="src short"><a href="#v:tidyTyCoVarOcc">tidyTyCoVarOcc</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a></li><li class="src short"><a href="#v:tidyTopType">tidyTopType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></li><li class="src short"><a href="#v:tidyKind">tidyKind</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></li><li class="src short"><a href="#v:tidyTyCoVarBinder">tidyTyCoVarBinder</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis)</li><li class="src short"><a href="#v:tidyTyCoVarBinders">tidyTyCoVarBinders</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis] -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis])</li><li class="src short"><a href="#v:isConstraintKindCon">isConstraintKindCon</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:classifiesTypeWithValues">classifiesTypeWithValues</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li><li class="src short"><a href="#v:isKindLevPoly">isKindLevPoly</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></li></ul></details></div><div id="interface"><a href="#g:1" id="g:1"><h1>Main data types representing Types</h1></a><div class="doc"><p><a id="type_classification"></a></p><p>Types are one of:</p><dl><dt>Unboxed</dt><dd>Iff its representation is other than a pointer
                      Unboxed types are also unlifted.</dd><dt>Lifted</dt><dd>Iff it has bottom as an element.
                      Closures always have lifted types: i.e. any
                      let-bound identifier in Core must have a lifted
                      type. Operationally, a lifted object is one that
                      can be entered.
                      Only lifted types may be unified with a type variable.</dd><dt>Algebraic</dt><dd>Iff it is a type with one or more constructors, whether
                      declared with <code>data</code> or <code>newtype</code>.
                      An algebraic type is one that can be deconstructed
                      with a case expression. This is <em>not</em> the same as
                      lifted types, because we also include unboxed
                      tuples in this classification.</dd><dt>Data</dt><dd>Iff it is a type declared with <code>data</code>, or a boxed tuple.</dd><dt>Primitive</dt><dd>Iff it is a built-in type that can't be expressed in Haskell.</dd></dl><p>Currently, all primitive types are unlifted, but that's not necessarily
 the case: for example, <code>Int</code> could be primitive.</p><p>Some primitive types are unboxed, such as <code>Int#</code>, whereas some are boxed
 but unlifted (such as <code>ByteArray#</code>).  The only primitive types that we
 classify as algebraic are the unboxed tuples.</p><p>Some examples of type classifications that may make this a bit clearer are:</p><pre>Type          primitive       boxed           lifted          algebraic
-----------------------------------------------------------------------------
Int#          Yes             No              No              No
ByteArray#    Yes             Yes             No              No
(# a, b #)  Yes             No              No              Yes
(# a | b #) Yes             No              No              Yes
(  a, b  )    No              Yes             Yes             Yes
[a]           No              Yes             Yes             Yes
</pre></div><div class="doc"><p>A <em>source type</em> is a type that is a separate type as far as the type checker is
 concerned, but which has a more low-level representation as far as Core-to-Core
 passes and the rest of the back end is concerned.</p><p>You don't normally have to worry about this, as the utility functions in
 this module will automatically convert a source into a representation type
 if they are spotted, to the best of its abilities. If you don't want this
 to happen, use the equivalent functions from the <a href="TcType.html">TcType</a> module.</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:TyThing" class="def">TyThing</a> <a href="src/GHC.Core.TyCo.Rep.html#TyThing" class="link">Source</a> <a href="#t:TyThing" class="selflink">#</a></p><div class="doc"><p>A global typecheckable-thing, essentially anything that has a name.
 Not to be confused with a <code>TcTyThing</code>, which is also a typecheckable
 thing but in the *local* context.  See <a href="GHC-Tc-Utils-Env.html">GHC.Tc.Utils.Env</a> for how to retrieve
 a <code><a href="GHC-Core-Type.html#t:TyThing" title="GHC.Core.Type">TyThing</a></code> given a <code><a href="GHC-Types-Name.html#t:Name" title="GHC.Types.Name">Name</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:AnId" class="def">AnId</a> <a href="GHC-Types-Var.html#t:Id" title="GHC.Types.Var">Id</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:AConLike" class="def">AConLike</a> <a href="GHC-Core-ConLike.html#t:ConLike" title="GHC.Core.ConLike">ConLike</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:ATyCon" class="def">ATyCon</a> <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:ACoAxiom" class="def">ACoAxiom</a> (<a href="GHC-Core-Coercion-Axiom.html#t:CoAxiom" title="GHC.Core.Coercion.Axiom">CoAxiom</a> <a href="GHC-Core-Coercion-Axiom.html#t:Branched" title="GHC.Core.Coercion.Axiom">Branched</a>)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:TyThing">Instances</h4><details id="i:TyThing" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:TyThing:NamedThing:1"></span> <a href="GHC-Types-Name.html#t:NamedThing" title="GHC.Types.Name">NamedThing</a> <a href="GHC-Core-Type.html#t:TyThing" title="GHC.Core.Type">TyThing</a></span> <a href="src/GHC.Core.TyCo.Rep.html#line-143" class="link">Source</a> <a href="#t:TyThing" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:TyThing:NamedThing:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getOccName">getOccName</a> :: <a href="GHC-Core-Type.html#t:TyThing" title="GHC.Core.Type">TyThing</a> -&gt; <a href="GHC-Types-Name-Occurrence.html#t:OccName" title="GHC.Types.Name.Occurrence">OccName</a> <a href="src/GHC.Types.Name.html#getOccName" class="link">Source</a> <a href="#v:getOccName" class="selflink">#</a></p><p class="src"><a href="#v:getName">getName</a> :: <a href="GHC-Core-Type.html#t:TyThing" title="GHC.Core.Type">TyThing</a> -&gt; <a href="GHC-Types-Name.html#t:Name" title="GHC.Types.Name">Name</a> <a href="src/GHC.Types.Name.html#getName" class="link">Source</a> <a href="#v:getName" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:TyThing:Outputable:2"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> <a href="GHC-Core-Type.html#t:TyThing" title="GHC.Core.Type">TyThing</a></span> <a href="src/GHC.Core.TyCo.Rep.html#line-140" class="link">Source</a> <a href="#t:TyThing" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:TyThing:Outputable:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Core-Type.html#t:TyThing" title="GHC.Core.Type">TyThing</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Core-Type.html#t:TyThing" title="GHC.Core.Type">TyThing</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Type" class="def">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#Type" class="link">Source</a> <a href="#t:Type" class="selflink">#</a></p><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Type">Instances</h4><details id="i:Type" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Type:Data:1"></span> <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></span> <a href="src/GHC.Core.TyCo.Rep.html#line-244" class="link">Source</a> <a href="#t:Type" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Type:Data:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (d -&gt; b) -&gt; d -&gt; c b) -&gt; (<span class="keyword">forall</span> g. g -&gt; c g) -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; c <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="../base/src/Data.Data.html#gfoldl" class="link">Source</a> <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; c (b -&gt; r) -&gt; c r) -&gt; (<span class="keyword">forall</span> r. r -&gt; c r) -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> -&gt; c <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="../base/src/Data.Data.html#gunfold" class="link">Source</a> <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> <a href="../base/src/Data.Data.html#toConstr" class="link">Source</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="../base/Data-Data.html#t:DataType" title="Data.Data">DataType</a> <a href="../base/src/Data.Data.html#dataTypeOf" class="link">Source</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (t d)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="../base/src/Data.Data.html#dataCast1" class="link">Source</a> <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d e. (<a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d, <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> e) =&gt; c (t d e)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="../base/src/Data.Data.html#dataCast2" class="link">Source</a> <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; b -&gt; b) -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="../base/src/Data.Data.html#gmapT" class="link">Source</a> <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -&gt; r' -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQl" class="link">Source</a> <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: <span class="keyword">forall</span> r r'. (r' -&gt; r -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQr" class="link">Source</a> <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [u] <a href="../base/src/Data.Data.html#gmapQ" class="link">Source</a> <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; u <a href="../base/src/Data.Data.html#gmapQi" class="link">Source</a> <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; m <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="../base/src/Data.Data.html#gmapM" class="link">Source</a> <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; m <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="../base/src/Data.Data.html#gmapMp" class="link">Source</a> <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; m <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="../base/src/Data.Data.html#gmapMo" class="link">Source</a> <a href="#v:gmapMo" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Type:Outputable:2"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></span> <a href="src/GHC.Core.TyCo.Rep.html#line-246" class="link">Source</a> <a href="#t:Type" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Type:Outputable:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ArgFlag" class="def">ArgFlag</a> <a href="src/GHC.Types.Var.html#ArgFlag" class="link">Source</a> <a href="#t:ArgFlag" class="selflink">#</a></p><div class="doc"><p>Argument Flag</p><p>Is something required to appear in source Haskell (<code><a href="GHC-Core-Type.html#v:Required" title="GHC.Core.Type">Required</a></code>),
 permitted by request (<code><a href="GHC-Core-Type.html#v:Specified" title="GHC.Core.Type">Specified</a></code>) (visible type application), or
 prohibited entirely from appearing in source Haskell (<code><a href="GHC-Core-Type.html#v:Inferred" title="GHC.Core.Type">Inferred</a></code>)?
 See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Invisible" class="def">Invisible</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:Required" class="def">Required</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs bundled-patterns"><p class="caption">Bundled Patterns</p><table><tr><td class="src"><span class="keyword">pattern</span> <a id="v:Specified" class="def">Specified</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><span class="keyword">pattern</span> <a id="v:Inferred" class="def">Inferred</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:ArgFlag">Instances</h4><details id="i:ArgFlag" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:ArgFlag:Data:1"></span> <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-449" class="link">Source</a> <a href="#t:ArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:ArgFlag:Data:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (d -&gt; b) -&gt; d -&gt; c b) -&gt; (<span class="keyword">forall</span> g. g -&gt; c g) -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; c <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="../base/src/Data.Data.html#gfoldl" class="link">Source</a> <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; c (b -&gt; r) -&gt; c r) -&gt; (<span class="keyword">forall</span> r. r -&gt; c r) -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> -&gt; c <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="../base/src/Data.Data.html#gunfold" class="link">Source</a> <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> <a href="../base/src/Data.Data.html#toConstr" class="link">Source</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="../base/Data-Data.html#t:DataType" title="Data.Data">DataType</a> <a href="../base/src/Data.Data.html#dataTypeOf" class="link">Source</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (t d)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>) <a href="../base/src/Data.Data.html#dataCast1" class="link">Source</a> <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d e. (<a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d, <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> e) =&gt; c (t d e)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>) <a href="../base/src/Data.Data.html#dataCast2" class="link">Source</a> <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; b -&gt; b) -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="../base/src/Data.Data.html#gmapT" class="link">Source</a> <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -&gt; r' -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQl" class="link">Source</a> <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: <span class="keyword">forall</span> r r'. (r' -&gt; r -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQr" class="link">Source</a> <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; [u] <a href="../base/src/Data.Data.html#gmapQ" class="link">Source</a> <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; u <a href="../base/src/Data.Data.html#gmapQi" class="link">Source</a> <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; m <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="../base/src/Data.Data.html#gmapM" class="link">Source</a> <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; m <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="../base/src/Data.Data.html#gmapMp" class="link">Source</a> <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; m <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="../base/src/Data.Data.html#gmapMo" class="link">Source</a> <a href="#v:gmapMo" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:ArgFlag:Binary:2"></span> <a href="GHC-Utils-Binary.html#t:Binary" title="GHC.Utils.Binary">Binary</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-499" class="link">Source</a> <a href="#t:ArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:ArgFlag:Binary:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:put_">put_</a> :: <a href="GHC-Utils-Binary.html#t:BinHandle" title="GHC.Utils.Binary">BinHandle</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:IO" title="GHC.Prelude">IO</a> () <a href="src/GHC.Utils.Binary.html#put_" class="link">Source</a> <a href="#v:put_" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: <a href="GHC-Utils-Binary.html#t:BinHandle" title="GHC.Utils.Binary">BinHandle</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:IO" title="GHC.Prelude">IO</a> (<a href="GHC-Utils-Binary.html#t:Bin" title="GHC.Utils.Binary">Bin</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>) <a href="src/GHC.Utils.Binary.html#put" class="link">Source</a> <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:get">get</a> :: <a href="GHC-Utils-Binary.html#t:BinHandle" title="GHC.Utils.Binary">BinHandle</a> -&gt; <a href="GHC-Prelude.html#t:IO" title="GHC.Prelude">IO</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="src/GHC.Utils.Binary.html#get" class="link">Source</a> <a href="#v:get" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:ArgFlag:Outputable:3"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-484" class="link">Source</a> <a href="#t:ArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:ArgFlag:Outputable:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:ArgFlag:Eq:4"></span> <a href="GHC-Prelude.html#t:Eq" title="GHC.Prelude">Eq</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-449" class="link">Source</a> <a href="#t:ArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:ArgFlag:Eq:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:ArgFlag:Ord:5"></span> <a href="GHC-Prelude.html#t:Ord" title="GHC.Prelude">Ord</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-449" class="link">Source</a> <a href="#t:ArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:ArgFlag:Ord:5"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="#v:min" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:ArgFlag:Outputable:6"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> tv =&gt; <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> (<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>)</span> <a href="src/GHC.Types.Var.html#line-678" class="link">Source</a> <a href="#t:ArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:ArgFlag:Outputable:6"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:AnonArgFlag" class="def">AnonArgFlag</a> <a href="src/GHC.Types.Var.html#AnonArgFlag" class="link">Source</a> <a href="#t:AnonArgFlag" class="selflink">#</a></p><div class="doc"><p>The non-dependent version of <code><a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></code>.
 See Note [AnonArgFlag]
 Appears here partly so that it's together with its friends ArgFlag
 and ForallVisFlag, but also because it is used in IfaceType, rather
 early in the compilation chain</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:VisArg" class="def">VisArg</a></td><td class="doc"><p>Used for <code>(-&gt;)</code>: an ordinary non-dependent arrow.
   The argument is visible in source code.</p></td></tr><tr><td class="src"><a id="v:InvisArg" class="def">InvisArg</a></td><td class="doc"><p>Used for <code>(=&gt;)</code>: a non-dependent predicate arrow.
   The argument is invisible in source code.</p></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:AnonArgFlag">Instances</h4><details id="i:AnonArgFlag" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:AnonArgFlag:Data:1"></span> <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-521" class="link">Source</a> <a href="#t:AnonArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:AnonArgFlag:Data:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (d -&gt; b) -&gt; d -&gt; c b) -&gt; (<span class="keyword">forall</span> g. g -&gt; c g) -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; c <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> <a href="../base/src/Data.Data.html#gfoldl" class="link">Source</a> <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; c (b -&gt; r) -&gt; c r) -&gt; (<span class="keyword">forall</span> r. r -&gt; c r) -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> -&gt; c <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> <a href="../base/src/Data.Data.html#gunfold" class="link">Source</a> <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> <a href="../base/src/Data.Data.html#toConstr" class="link">Source</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="../base/Data-Data.html#t:DataType" title="Data.Data">DataType</a> <a href="../base/src/Data.Data.html#dataTypeOf" class="link">Source</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (t d)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a>) <a href="../base/src/Data.Data.html#dataCast1" class="link">Source</a> <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d e. (<a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d, <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> e) =&gt; c (t d e)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a>) <a href="../base/src/Data.Data.html#dataCast2" class="link">Source</a> <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; b -&gt; b) -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> <a href="../base/src/Data.Data.html#gmapT" class="link">Source</a> <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -&gt; r' -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQl" class="link">Source</a> <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: <span class="keyword">forall</span> r r'. (r' -&gt; r -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQr" class="link">Source</a> <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; [u] <a href="../base/src/Data.Data.html#gmapQ" class="link">Source</a> <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; u <a href="../base/src/Data.Data.html#gmapQi" class="link">Source</a> <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; m <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> <a href="../base/src/Data.Data.html#gmapM" class="link">Source</a> <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; m <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> <a href="../base/src/Data.Data.html#gmapMp" class="link">Source</a> <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; m <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> <a href="../base/src/Data.Data.html#gmapMo" class="link">Source</a> <a href="#v:gmapMo" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:AnonArgFlag:Binary:2"></span> <a href="GHC-Utils-Binary.html#t:Binary" title="GHC.Utils.Binary">Binary</a> <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-527" class="link">Source</a> <a href="#t:AnonArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:AnonArgFlag:Binary:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:put_">put_</a> :: <a href="GHC-Utils-Binary.html#t:BinHandle" title="GHC.Utils.Binary">BinHandle</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:IO" title="GHC.Prelude">IO</a> () <a href="src/GHC.Utils.Binary.html#put_" class="link">Source</a> <a href="#v:put_" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: <a href="GHC-Utils-Binary.html#t:BinHandle" title="GHC.Utils.Binary">BinHandle</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:IO" title="GHC.Prelude">IO</a> (<a href="GHC-Utils-Binary.html#t:Bin" title="GHC.Utils.Binary">Bin</a> <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a>) <a href="src/GHC.Utils.Binary.html#put" class="link">Source</a> <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:get">get</a> :: <a href="GHC-Utils-Binary.html#t:BinHandle" title="GHC.Utils.Binary">BinHandle</a> -&gt; <a href="GHC-Prelude.html#t:IO" title="GHC.Prelude">IO</a> <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> <a href="src/GHC.Utils.Binary.html#get" class="link">Source</a> <a href="#v:get" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:AnonArgFlag:Outputable:3"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-523" class="link">Source</a> <a href="#t:AnonArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:AnonArgFlag:Outputable:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:AnonArgFlag:Eq:4"></span> <a href="GHC-Prelude.html#t:Eq" title="GHC.Prelude">Eq</a> <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-521" class="link">Source</a> <a href="#t:AnonArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:AnonArgFlag:Eq:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:AnonArgFlag:Ord:5"></span> <a href="GHC-Prelude.html#t:Ord" title="GHC.Prelude">Ord</a> <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a></span> <a href="src/GHC.Types.Var.html#line-521" class="link">Source</a> <a href="#t:AnonArgFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:AnonArgFlag:Ord:5"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> <a href="#v:min" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Specificity" class="def">Specificity</a> <a href="src/GHC.Types.Var.html#Specificity" class="link">Source</a> <a href="#t:Specificity" class="selflink">#</a></p><div class="doc"><p>Whether an <code><a href="GHC-Core-Type.html#v:Invisible" title="GHC.Core.Type">Invisible</a></code> argument may appear in source Haskell.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:InferredSpec" class="def">InferredSpec</a></td><td class="doc"><p>the argument may not appear in source Haskell, it is
 only inferred.</p></td></tr><tr><td class="src"><a id="v:SpecifiedSpec" class="def">SpecifiedSpec</a></td><td class="doc"><p>the argument may appear in source Haskell, but isn't
 required.</p></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Specificity">Instances</h4><details id="i:Specificity" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Specificity:Data:1"></span> <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a></span> <a href="src/GHC.Types.Var.html#line-459" class="link">Source</a> <a href="#t:Specificity" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Specificity:Data:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (d -&gt; b) -&gt; d -&gt; c b) -&gt; (<span class="keyword">forall</span> g. g -&gt; c g) -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; c <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> <a href="../base/src/Data.Data.html#gfoldl" class="link">Source</a> <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; c (b -&gt; r) -&gt; c r) -&gt; (<span class="keyword">forall</span> r. r -&gt; c r) -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> -&gt; c <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> <a href="../base/src/Data.Data.html#gunfold" class="link">Source</a> <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> <a href="../base/src/Data.Data.html#toConstr" class="link">Source</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="../base/Data-Data.html#t:DataType" title="Data.Data">DataType</a> <a href="../base/src/Data.Data.html#dataTypeOf" class="link">Source</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (t d)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a>) <a href="../base/src/Data.Data.html#dataCast1" class="link">Source</a> <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d e. (<a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d, <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> e) =&gt; c (t d e)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a>) <a href="../base/src/Data.Data.html#dataCast2" class="link">Source</a> <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; b -&gt; b) -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> <a href="../base/src/Data.Data.html#gmapT" class="link">Source</a> <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -&gt; r' -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQl" class="link">Source</a> <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: <span class="keyword">forall</span> r r'. (r' -&gt; r -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQr" class="link">Source</a> <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; [u] <a href="../base/src/Data.Data.html#gmapQ" class="link">Source</a> <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; u <a href="../base/src/Data.Data.html#gmapQi" class="link">Source</a> <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; m <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> <a href="../base/src/Data.Data.html#gmapM" class="link">Source</a> <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; m <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> <a href="../base/src/Data.Data.html#gmapMp" class="link">Source</a> <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; m <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> <a href="../base/src/Data.Data.html#gmapMo" class="link">Source</a> <a href="#v:gmapMo" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Specificity:OutputableBndrFlag:2"></span> <a href="GHC-Hs-Type.html#t:OutputableBndrFlag" title="GHC.Hs.Type">OutputableBndrFlag</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a></span> <a href="src/GHC.Hs.Type.html#line-1786" class="link">Source</a> <a href="#t:OutputableBndrFlag" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Specificity:OutputableBndrFlag:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Hs-Type.html">GHC.Hs.Type</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pprTyVarBndr">pprTyVarBndr</a> :: <span class="keyword">forall</span> (p :: <a href="GHC-Hs-Extension.html#t:Pass" title="GHC.Hs.Extension">Pass</a>). <a href="GHC-Hs-Extension.html#t:OutputableBndrId" title="GHC.Hs.Extension">OutputableBndrId</a> p =&gt; <a href="GHC-Hs-Type.html#t:HsTyVarBndr" title="GHC.Hs.Type">HsTyVarBndr</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> (<a href="GHC-Hs-Extension.html#t:GhcPass" title="GHC.Hs.Extension">GhcPass</a> p) -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Specificity:Binary:3"></span> <a href="GHC-Utils-Binary.html#t:Binary" title="GHC.Utils.Binary">Binary</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a></span> <a href="src/GHC.Types.Var.html#line-489" class="link">Source</a> <a href="#t:Specificity" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Specificity:Binary:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:put_">put_</a> :: <a href="GHC-Utils-Binary.html#t:BinHandle" title="GHC.Utils.Binary">BinHandle</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Prelude.html#t:IO" title="GHC.Prelude">IO</a> () <a href="src/GHC.Utils.Binary.html#put_" class="link">Source</a> <a href="#v:put_" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: <a href="GHC-Utils-Binary.html#t:BinHandle" title="GHC.Utils.Binary">BinHandle</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Prelude.html#t:IO" title="GHC.Prelude">IO</a> (<a href="GHC-Utils-Binary.html#t:Bin" title="GHC.Utils.Binary">Bin</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a>) <a href="src/GHC.Utils.Binary.html#put" class="link">Source</a> <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:get">get</a> :: <a href="GHC-Utils-Binary.html#t:BinHandle" title="GHC.Utils.Binary">BinHandle</a> -&gt; <a href="GHC-Prelude.html#t:IO" title="GHC.Prelude">IO</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> <a href="src/GHC.Utils.Binary.html#get" class="link">Source</a> <a href="#v:get" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Specificity:Eq:4"></span> <a href="GHC-Prelude.html#t:Eq" title="GHC.Prelude">Eq</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a></span> <a href="src/GHC.Types.Var.html#line-459" class="link">Source</a> <a href="#t:Specificity" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Specificity:Eq:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Specificity:Ord:5"></span> <a href="GHC-Prelude.html#t:Ord" title="GHC.Prelude">Ord</a> <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a></span> <a href="src/GHC.Types.Var.html#line-459" class="link">Source</a> <a href="#t:Specificity" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Specificity:Ord:5"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> <a href="#v:min" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Specificity:Outputable:6"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> tv =&gt; <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> (<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a>)</span> <a href="src/GHC.Types.Var.html#line-683" class="link">Source</a> <a href="#t:Specificity" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Specificity:Outputable:6"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:KindOrType" class="def">KindOrType</a> = <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#KindOrType" class="link">Source</a> <a href="#t:KindOrType" class="selflink">#</a></p><div class="doc"><p>The key representation of types within the compiler</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:PredType" class="def">PredType</a> = <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#PredType" class="link">Source</a> <a href="#t:PredType" class="selflink">#</a></p><div class="doc"><p>A type of the form <code>p</code> of constraint kind represents a value whose type is
 the Haskell predicate <code>p</code>, where a predicate is what occurs before
 the <code>=&gt;</code> in a Haskell type.</p><p>We use <code><a href="GHC-Core-Type.html#t:PredType" title="GHC.Core.Type">PredType</a></code> as documentation to mark those types that we guarantee to
 have this kind.</p><p>It can be expanded into its representation, but:</p><ul><li>The type checker must treat it as opaque</li><li>The rest of the compiler treats it as transparent</li></ul><p>Consider these examples:</p><pre>f :: (Eq a) =&gt; a -&gt; Int
g :: (?x :: Int -&gt; Int) =&gt; a -&gt; Int
h :: (r\l) =&gt; {r} =&gt; {l::Int | r}</pre><p>Here the <code>Eq a</code> and <code>?x :: Int -&gt; Int</code> and <code>rl</code> are all called &quot;predicates&quot;</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:ThetaType" class="def">ThetaType</a> = [<a href="GHC-Core-Type.html#t:PredType" title="GHC.Core.Type">PredType</a>] <a href="src/GHC.Core.TyCo.Rep.html#ThetaType" class="link">Source</a> <a href="#t:ThetaType" class="selflink">#</a></p><div class="doc"><p>A collection of <code><a href="GHC-Core-Type.html#t:PredType" title="GHC.Core.Type">PredType</a></code>s</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Var" class="def">Var</a> <a href="src/GHC.Types.Var.html#Var" class="link">Source</a> <a href="#t:Var" class="selflink">#</a></p><div class="doc"><p>Variable</p><p>Essentially a typed <code><a href="GHC-Types-Name.html#t:Name" title="GHC.Types.Name">Name</a></code>, that may also contain some additional information
 about the <code><a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></code> and its use sites.</p></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Var">Instances</h4><details id="i:Var" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Var:Data:1"></span> <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></span> <a href="src/GHC.Types.Var.html#line-375" class="link">Source</a> <a href="#t:Var" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Var:Data:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (d -&gt; b) -&gt; d -&gt; c b) -&gt; (<span class="keyword">forall</span> g. g -&gt; c g) -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; c <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> <a href="../base/src/Data.Data.html#gfoldl" class="link">Source</a> <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; c (b -&gt; r) -&gt; c r) -&gt; (<span class="keyword">forall</span> r. r -&gt; c r) -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> -&gt; c <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> <a href="../base/src/Data.Data.html#gunfold" class="link">Source</a> <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> <a href="../base/src/Data.Data.html#toConstr" class="link">Source</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="../base/Data-Data.html#t:DataType" title="Data.Data">DataType</a> <a href="../base/src/Data.Data.html#dataTypeOf" class="link">Source</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (t d)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>) <a href="../base/src/Data.Data.html#dataCast1" class="link">Source</a> <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d e. (<a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d, <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> e) =&gt; c (t d e)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>) <a href="../base/src/Data.Data.html#dataCast2" class="link">Source</a> <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; b -&gt; b) -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> <a href="../base/src/Data.Data.html#gmapT" class="link">Source</a> <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -&gt; r' -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQl" class="link">Source</a> <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: <span class="keyword">forall</span> r r'. (r' -&gt; r -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQr" class="link">Source</a> <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; [u] <a href="../base/src/Data.Data.html#gmapQ" class="link">Source</a> <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; u <a href="../base/src/Data.Data.html#gmapQi" class="link">Source</a> <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; m <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> <a href="../base/src/Data.Data.html#gmapM" class="link">Source</a> <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; m <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> <a href="../base/src/Data.Data.html#gmapMp" class="link">Source</a> <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; m <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> <a href="../base/src/Data.Data.html#gmapMo" class="link">Source</a> <a href="#v:gmapMo" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Var:NamedThing:2"></span> <a href="GHC-Types-Name.html#t:NamedThing" title="GHC.Types.Name">NamedThing</a> <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></span> <a href="src/GHC.Types.Var.html#line-352" class="link">Source</a> <a href="#t:Var" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Var:NamedThing:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getOccName">getOccName</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Types-Name-Occurrence.html#t:OccName" title="GHC.Types.Name.Occurrence">OccName</a> <a href="src/GHC.Types.Name.html#getOccName" class="link">Source</a> <a href="#v:getOccName" class="selflink">#</a></p><p class="src"><a href="#v:getName">getName</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Types-Name.html#t:Name" title="GHC.Types.Name">Name</a> <a href="src/GHC.Types.Name.html#getName" class="link">Source</a> <a href="#v:getName" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Var:HasOccName:3"></span> <a href="GHC-Types-Name-Occurrence.html#t:HasOccName" title="GHC.Types.Name.Occurrence">HasOccName</a> <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></span> <a href="src/GHC.Types.Var.html#line-381" class="link">Source</a> <a href="#t:Var" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Var:HasOccName:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:occName">occName</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Types-Name-Occurrence.html#t:OccName" title="GHC.Types.Name.Occurrence">OccName</a> <a href="src/GHC.Types.Name.Occurrence.html#occName" class="link">Source</a> <a href="#v:occName" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Var:Uniquable:4"></span> <a href="GHC-Types-Unique.html#t:Uniquable" title="GHC.Types.Unique">Uniquable</a> <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></span> <a href="src/GHC.Types.Var.html#line-355" class="link">Source</a> <a href="#t:Var" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Var:Uniquable:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getUnique">getUnique</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Types-Unique.html#t:Unique" title="GHC.Types.Unique">Unique</a> <a href="src/GHC.Types.Unique.html#getUnique" class="link">Source</a> <a href="#v:getUnique" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Var:Outputable:5"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></span> <a href="src/GHC.Types.Var.html#line-320" class="link">Source</a> <a href="#t:Var" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Var:Outputable:5"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Var:OutputableBndr:6"></span> <a href="GHC-Utils-Outputable.html#t:OutputableBndr" title="GHC.Utils.Outputable">OutputableBndr</a> <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></span> <a href="src/GHC.Core.Ppr.html#line-358" class="link">Source</a> <a href="#t:OutputableBndr" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Var:OutputableBndr:6"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-Ppr.html">GHC.Core.Ppr</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pprBndr">pprBndr</a> :: <a href="GHC-Utils-Outputable.html#t:BindingSite" title="GHC.Utils.Outputable">BindingSite</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprBndr" class="link">Source</a> <a href="#v:pprBndr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrefixOcc">pprPrefixOcc</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrefixOcc" class="link">Source</a> <a href="#v:pprPrefixOcc" class="selflink">#</a></p><p class="src"><a href="#v:pprInfixOcc">pprInfixOcc</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprInfixOcc" class="link">Source</a> <a href="#v:pprInfixOcc" class="selflink">#</a></p><p class="src"><a href="#v:bndrIsJoin_maybe">bndrIsJoin_maybe</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> <a href="src/GHC.Utils.Outputable.html#bndrIsJoin_maybe" class="link">Source</a> <a href="#v:bndrIsJoin_maybe" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Var:Eq:7"></span> <a href="GHC-Prelude.html#t:Eq" title="GHC.Prelude">Eq</a> <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></span> <a href="src/GHC.Types.Var.html#line-358" class="link">Source</a> <a href="#t:Var" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Var:Eq:7"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Var:Ord:8"></span> <a href="GHC-Prelude.html#t:Ord" title="GHC.Prelude">Ord</a> <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></span> <a href="src/GHC.Types.Var.html#line-361" class="link">Source</a> <a href="#t:Var" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Var:Ord:8"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Types-Var.html">GHC.Types.Var</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> <a href="#v:min" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:TyVar" class="def">TyVar</a> = <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> <a href="src/GHC.Types.Var.html#TyVar" class="link">Source</a> <a href="#t:TyVar" class="selflink">#</a></p><div class="doc"><p>Type or kind Variable</p></div></div><div class="top"><p class="src"><a id="v:isTyVar" class="def">isTyVar</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Types.Var.html#isTyVar" class="link">Source</a> <a href="#v:isTyVar" class="selflink">#</a></p><div class="doc"><p>Is this a type-level (i.e., computationally irrelevant, thus erasable)
 variable? Satisfies <code>isTyVar = not . isId</code>.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:TyCoVar" class="def">TyCoVar</a> = <a href="GHC-Types-Var.html#t:Id" title="GHC.Types.Var">Id</a> <a href="src/GHC.Types.Var.html#TyCoVar" class="link">Source</a> <a href="#t:TyCoVar" class="selflink">#</a></p><div class="doc"><p>Type or Coercion Variable</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:TyCoBinder" class="def">TyCoBinder</a> <a href="src/GHC.Core.TyCo.Rep.html#TyCoBinder" class="link">Source</a> <a href="#t:TyCoBinder" class="selflink">#</a></p><div class="doc"><p>A <code><a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a></code> represents an argument to a function. TyCoBinders can be
 dependent (<code><a href="GHC-Core-TyCo-Rep.html#v:Named" title="GHC.Core.TyCo.Rep">Named</a></code>) or nondependent (<code><a href="GHC-Core-TyCo-Rep.html#v:Anon" title="GHC.Core.TyCo.Rep">Anon</a></code>). They may also be visible or
 not. See Note [TyCoBinders]</p></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:TyCoBinder">Instances</h4><details id="i:TyCoBinder" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:TyCoBinder:Data:1"></span> <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a></span> <a href="src/GHC.Core.TyCo.Rep.html#line-694" class="link">Source</a> <a href="#t:TyCoBinder" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:TyCoBinder:Data:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (d -&gt; b) -&gt; d -&gt; c b) -&gt; (<span class="keyword">forall</span> g. g -&gt; c g) -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; c <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> <a href="../base/src/Data.Data.html#gfoldl" class="link">Source</a> <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; c (b -&gt; r) -&gt; c r) -&gt; (<span class="keyword">forall</span> r. r -&gt; c r) -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> -&gt; c <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> <a href="../base/src/Data.Data.html#gunfold" class="link">Source</a> <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> <a href="../base/src/Data.Data.html#toConstr" class="link">Source</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="../base/Data-Data.html#t:DataType" title="Data.Data">DataType</a> <a href="../base/src/Data.Data.html#dataTypeOf" class="link">Source</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (t d)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>) <a href="../base/src/Data.Data.html#dataCast1" class="link">Source</a> <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d e. (<a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d, <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> e) =&gt; c (t d e)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>) <a href="../base/src/Data.Data.html#dataCast2" class="link">Source</a> <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; b -&gt; b) -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> <a href="../base/src/Data.Data.html#gmapT" class="link">Source</a> <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -&gt; r' -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQl" class="link">Source</a> <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: <span class="keyword">forall</span> r r'. (r' -&gt; r -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; r <a href="../base/src/Data.Data.html#gmapQr" class="link">Source</a> <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; [u] <a href="../base/src/Data.Data.html#gmapQ" class="link">Source</a> <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; u <a href="../base/src/Data.Data.html#gmapQi" class="link">Source</a> <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; m <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> <a href="../base/src/Data.Data.html#gmapM" class="link">Source</a> <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; m <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> <a href="../base/src/Data.Data.html#gmapMp" class="link">Source</a> <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; m <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> <a href="../base/src/Data.Data.html#gmapMo" class="link">Source</a> <a href="#v:gmapMo" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:TyCoBinder:Outputable:2"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a></span> <a href="src/GHC.Core.TyCo.Rep.html#line-696" class="link">Source</a> <a href="#t:TyCoBinder" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:TyCoBinder:Outputable:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:TyCoVarBinder" class="def">TyCoVarBinder</a> = <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="src/GHC.Types.Var.html#TyCoVarBinder" class="link">Source</a> <a href="#t:TyCoVarBinder" class="selflink">#</a></p><div class="doc"><p>Variable Binder</p><p>A <code><a href="GHC-Core-Type.html#t:TyCoVarBinder" title="GHC.Core.Type">TyCoVarBinder</a></code> is the binder of a ForAllTy
 It's convenient to define this synonym here rather its natural
 home in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a>, because it's used in GHC.Core.DataCon.hs-boot</p><p>A <code><a href="GHC-Core-Type.html#t:TyVarBinder" title="GHC.Core.Type">TyVarBinder</a></code> is a binder with only TyVar</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:TyVarBinder" class="def">TyVarBinder</a> = <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> <a href="src/GHC.Types.Var.html#TyVarBinder" class="link">Source</a> <a href="#t:TyVarBinder" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Mult" class="def">Mult</a> = <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#Mult" class="link">Source</a> <a href="#t:Mult" class="selflink">#</a></p><div class="doc"><p>Mult is a type alias for Type.</p><p>Mult must contain Type because multiplicity variables are mere type variables
(of kind Multiplicity) in Haskell. So the simplest implementation is to make
Mult be Type.</p><p>Multiplicities can be formed with:
- One: GHC.Types.One (= oneDataCon)
- Many: GHC.Types.Many (= manyDataCon)
- Multiplication: GHC.Types.MultMul (= multMulTyCon)</p><p>So that Mult feels a bit more structured, we provide pattern synonyms and smart
constructors for these.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Scaled" class="def">Scaled</a> a <a href="src/GHC.Core.TyCo.Rep.html#Scaled" class="link">Source</a> <a href="#t:Scaled" class="selflink">#</a></p><div class="doc"><p>A shorthand for data with an attached <code><a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a></code> element (the multiplicity).</p></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Scaled">Instances</h4><details id="i:Scaled" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Scaled:Data:1"></span> <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> a =&gt; <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> (<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a)</span> <a href="src/GHC.Core.TyCo.Rep.html#line-2028" class="link">Source</a> <a href="#t:Scaled" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Scaled:Data:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (d -&gt; b) -&gt; d -&gt; c b) -&gt; (<span class="keyword">forall</span> g. g -&gt; c g) -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; c (<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a) <a href="../base/src/Data.Data.html#gfoldl" class="link">Source</a> <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; c (b -&gt; r) -&gt; c r) -&gt; (<span class="keyword">forall</span> r. r -&gt; c r) -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> -&gt; c (<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a) <a href="../base/src/Data.Data.html#gunfold" class="link">Source</a> <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; <a href="../base/Data-Data.html#t:Constr" title="Data.Data">Constr</a> <a href="../base/src/Data.Data.html#toConstr" class="link">Source</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; <a href="../base/Data-Data.html#t:DataType" title="Data.Data">DataType</a> <a href="../base/src/Data.Data.html#dataTypeOf" class="link">Source</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; c (t d)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c (<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a)) <a href="../base/src/Data.Data.html#dataCast1" class="link">Source</a> <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="../base/Data-Typeable.html#t:Typeable" title="Data.Typeable">Typeable</a> t =&gt; (<span class="keyword">forall</span> d e. (<a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d, <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> e) =&gt; c (t d e)) -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (c (<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a)) <a href="../base/src/Data.Data.html#dataCast2" class="link">Source</a> <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> b =&gt; b -&gt; b) -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a <a href="../base/src/Data.Data.html#gmapT" class="link">Source</a> <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -&gt; r' -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; r <a href="../base/src/Data.Data.html#gmapQl" class="link">Source</a> <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: <span class="keyword">forall</span> r r'. (r' -&gt; r -&gt; r) -&gt; r -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; r') -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; r <a href="../base/src/Data.Data.html#gmapQr" class="link">Source</a> <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; [u] <a href="../base/src/Data.Data.html#gmapQ" class="link">Source</a> <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; u) -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; u <a href="../base/src/Data.Data.html#gmapQi" class="link">Source</a> <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; m (<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a) <a href="../base/src/Data.Data.html#gmapM" class="link">Source</a> <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; m (<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a) <a href="../base/src/Data.Data.html#gmapMp" class="link">Source</a> <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="../base/Control-Monad.html#t:MonadPlus" title="Control.Monad">MonadPlus</a> m =&gt; (<span class="keyword">forall</span> d. <a href="../base/Data-Data.html#t:Data" title="Data.Data">Data</a> d =&gt; d -&gt; m d) -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; m (<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a) <a href="../base/src/Data.Data.html#gmapMo" class="link">Source</a> <a href="#v:gmapMo" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Scaled:Outputable:2"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> a =&gt; <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> (<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a)</span> <a href="src/GHC.Core.TyCo.Rep.html#line-2036" class="link">Source</a> <a href="#t:Scaled" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Scaled:Outputable:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:KnotTied" class="def">KnotTied</a> ty = ty <a href="src/GHC.Core.TyCo.Rep.html#KnotTied" class="link">Source</a> <a href="#t:KnotTied" class="selflink">#</a></p><div class="doc"><p>A type labeled <code><a href="GHC-Core-Type.html#t:KnotTied" title="GHC.Core.Type">KnotTied</a></code> might have knot-tied tycons in it. See
 Note [Type checking recursive type and class declarations] in
 <a href="GHC-Tc-TyCl.html">GHC.Tc.TyCl</a></p></div></div><a href="#g:2" id="g:2"><h2>Constructing and deconstructing types</h2></a><div class="top"><p class="src"><a id="v:mkTyVarTy" class="def">mkTyVarTy</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkTyVarTy" class="link">Source</a> <a href="#v:mkTyVarTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mkTyVarTys" class="def">mkTyVarTys</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.TyCo.Rep.html#mkTyVarTys" class="link">Source</a> <a href="#v:mkTyVarTys" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getTyVar" class="def">getTyVar</a> :: <a href="GHC-Prelude.html#t:String" title="GHC.Prelude">String</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> <a href="src/GHC.Core.Type.html#getTyVar" class="link">Source</a> <a href="#v:getTyVar" class="selflink">#</a></p><div class="doc"><p>Attempts to obtain the type variable underlying a <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code>, and panics with the
 given message if this is not a type variable type. See also <code><a href="GHC-Core-Type.html#v:getTyVar_maybe" title="GHC.Core.Type">getTyVar_maybe</a></code></p></div></div><div class="top"><p class="src"><a id="v:getTyVar_maybe" class="def">getTyVar_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> <a href="src/GHC.Core.Type.html#getTyVar_maybe" class="link">Source</a> <a href="#v:getTyVar_maybe" class="selflink">#</a></p><div class="doc"><p>Attempts to obtain the type variable underlying a <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code></p></div></div><div class="top"><p class="src"><a id="v:repGetTyVar_maybe" class="def">repGetTyVar_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> <a href="src/GHC.Core.Type.html#repGetTyVar_maybe" class="link">Source</a> <a href="#v:repGetTyVar_maybe" class="selflink">#</a></p><div class="doc"><p>Attempts to obtain the type variable underlying a <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code>, without
 any expansion</p></div></div><div class="top"><p class="src"><a id="v:getCastedTyVar_maybe" class="def">getCastedTyVar_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>, <a href="GHC-Core-Coercion.html#t:CoercionN" title="GHC.Core.Coercion">CoercionN</a>) <a href="src/GHC.Core.Type.html#getCastedTyVar_maybe" class="link">Source</a> <a href="#v:getCastedTyVar_maybe" class="selflink">#</a></p><div class="doc"><p>If the type is a tyvar, possibly under a cast, returns it, along
 with the coercion. Thus, the co is :: kind tv ~N kind ty</p></div></div><div class="top"><p class="src"><a id="v:tyVarKind" class="def">tyVarKind</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> <a href="src/GHC.Types.Var.html#tyVarKind" class="link">Source</a> <a href="#v:tyVarKind" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:varType" class="def">varType</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> <a href="src/GHC.Types.Var.html#varType" class="link">Source</a> <a href="#v:varType" class="selflink">#</a></p><div class="doc"><p>The type or kind of the <code><a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a></code> in question</p></div></div><div class="top"><p class="src"><a id="v:mkAppTy" class="def">mkAppTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkAppTy" class="link">Source</a> <a href="#v:mkAppTy" class="selflink">#</a></p><div class="doc"><p>Applies a type to another, as in e.g. <code>k a</code></p></div></div><div class="top"><p class="src"><a id="v:mkAppTys" class="def">mkAppTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkAppTys" class="link">Source</a> <a href="#v:mkAppTys" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:splitAppTy" class="def">splitAppTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitAppTy" class="link">Source</a> <a href="#v:splitAppTy" class="selflink">#</a></p><div class="doc"><p>Attempts to take a type application apart, as in <code><a href="GHC-Core-Type.html#v:splitAppTy_maybe" title="GHC.Core.Type">splitAppTy_maybe</a></code>,
 and panics if this is not possible</p></div></div><div class="top"><p class="src"><a id="v:splitAppTys" class="def">splitAppTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]) <a href="src/GHC.Core.Type.html#splitAppTys" class="link">Source</a> <a href="#v:splitAppTys" class="selflink">#</a></p><div class="doc"><p>Recursively splits a type as far as is possible, leaving a residual
 type being applied to and the type arguments applied to it. Never fails,
 even if that means returning an empty list of type applications.</p></div></div><div class="top"><p class="src"><a id="v:repSplitAppTys" class="def">repSplitAppTys</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]) <a href="src/GHC.Core.Type.html#repSplitAppTys" class="link">Source</a> <a href="#v:repSplitAppTys" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:splitAppTys" title="GHC.Core.Type">splitAppTys</a></code>, but doesn't look through type synonyms</p></div></div><div class="top"><p class="src"><a id="v:splitAppTy_maybe" class="def">splitAppTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitAppTy_maybe" class="link">Source</a> <a href="#v:splitAppTy_maybe" class="selflink">#</a></p><div class="doc"><p>Attempt to take a type application apart, whether it is a
 function, type constructor, or plain type application. Note
 that type family applications are NEVER unsaturated by this!</p></div></div><div class="top"><p class="src"><a id="v:repSplitAppTy_maybe" class="def">repSplitAppTy_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#repSplitAppTy_maybe" class="link">Source</a> <a href="#v:repSplitAppTy_maybe" class="selflink">#</a></p><div class="doc"><p>Does the AppTy split as in <code><a href="GHC-Core-Type.html#v:splitAppTy_maybe" title="GHC.Core.Type">splitAppTy_maybe</a></code>, but assumes that
 any Core view stuff is already done</p></div></div><div class="top"><p class="src"><a id="v:tcRepSplitAppTy_maybe" class="def">tcRepSplitAppTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#tcRepSplitAppTy_maybe" class="link">Source</a> <a href="#v:tcRepSplitAppTy_maybe" class="selflink">#</a></p><div class="doc"><p>Does the AppTy split as in <code>tcSplitAppTy_maybe</code>, but assumes that
 any coreView stuff is already done. Refuses to look through (c =&gt; t)</p></div></div><div class="top"><p class="src"><a id="v:mkVisFunTy" class="def">mkVisFunTy</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <span class="fixity">infixr 3</span><span class="rightedge"></span> <a href="src/GHC.Core.TyCo.Rep.html#mkVisFunTy" class="link">Source</a> <a href="#v:mkVisFunTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mkInvisFunTy" class="def">mkInvisFunTy</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <span class="fixity">infixr 3</span><span class="rightedge"></span> <a href="src/GHC.Core.TyCo.Rep.html#mkInvisFunTy" class="link">Source</a> <a href="#v:mkInvisFunTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mkVisFunTys" class="def">mkVisFunTys</a> :: [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkVisFunTys" class="link">Source</a> <a href="#v:mkVisFunTys" class="selflink">#</a></p><div class="doc"><p>Make nested arrow types</p></div></div><div class="top"><p class="src"><a id="v:mkVisFunTyMany" class="def">mkVisFunTyMany</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <span class="fixity">infixr 3</span><span class="rightedge"></span> <a href="src/GHC.Core.TyCo.Rep.html#mkVisFunTyMany" class="link">Source</a> <a href="#v:mkVisFunTyMany" class="selflink">#</a></p><div class="doc"><p>Special, common, case: Arrow type with mult Many</p></div></div><div class="top"><p class="src"><a id="v:mkInvisFunTyMany" class="def">mkInvisFunTyMany</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <span class="fixity">infixr 3</span><span class="rightedge"></span> <a href="src/GHC.Core.TyCo.Rep.html#mkInvisFunTyMany" class="link">Source</a> <a href="#v:mkInvisFunTyMany" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mkVisFunTysMany" class="def">mkVisFunTysMany</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkVisFunTysMany" class="link">Source</a> <a href="#v:mkVisFunTysMany" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mkInvisFunTysMany" class="def">mkInvisFunTysMany</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkInvisFunTysMany" class="link">Source</a> <a href="#v:mkInvisFunTysMany" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:splitFunTy" class="def">splitFunTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitFunTy" class="link">Source</a> <a href="#v:splitFunTy" class="selflink">#</a></p><div class="doc"><p>Attempts to extract the argument and result types from a type, and
 panics if that is not possible. See also <code><a href="GHC-Core-Type.html#v:splitFunTy_maybe" title="GHC.Core.Type">splitFunTy_maybe</a></code></p></div></div><div class="top"><p class="src"><a id="v:splitFunTy_maybe" class="def">splitFunTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitFunTy_maybe" class="link">Source</a> <a href="#v:splitFunTy_maybe" class="selflink">#</a></p><div class="doc"><p>Attempts to extract the argument and result types from a type</p></div></div><div class="top"><p class="src"><a id="v:splitFunTys" class="def">splitFunTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitFunTys" class="link">Source</a> <a href="#v:splitFunTys" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:funResultTy" class="def">funResultTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#funResultTy" class="link">Source</a> <a href="#v:funResultTy" class="selflink">#</a></p><div class="doc"><p>Extract the function result type and panic if that is not possible</p></div></div><div class="top"><p class="src"><a id="v:funArgTy" class="def">funArgTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#funArgTy" class="link">Source</a> <a href="#v:funArgTy" class="selflink">#</a></p><div class="doc"><p>Just like <code><a href="GHC-Core-Type.html#v:piResultTys" title="GHC.Core.Type">piResultTys</a></code> but for a single argument
 Try not to iterate <code><a href="GHC-Core-Type.html#v:piResultTy" title="GHC.Core.Type">piResultTy</a></code>, because it's inefficient to substitute
 one variable at a time; instead use 'piResultTys&quot;</p><p>Extract the function argument type and panic if that is not possible</p></div></div><div class="top"><p class="src"><a id="v:mkTyConApp" class="def">mkTyConApp</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkTyConApp" class="link">Source</a> <a href="#v:mkTyConApp" class="selflink">#</a></p><div class="doc"><p>A key function: builds a <code><a href="GHC-Core-TyCo-Rep.html#v:TyConApp" title="GHC.Core.TyCo.Rep">TyConApp</a></code> or <code><a href="GHC-Core-TyCo-Rep.html#v:FunTy" title="GHC.Core.TyCo.Rep">FunTy</a></code> as appropriate to
 its arguments.  Applies its arguments to the constructor from left to right.</p></div></div><div class="top"><p class="src"><a id="v:mkTyConTy" class="def">mkTyConTy</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkTyConTy" class="link">Source</a> <a href="#v:mkTyConTy" class="selflink">#</a></p><div class="doc"><p>Create the plain type constructor type which has been applied to no type arguments at all.</p></div></div><div class="top"><p class="src"><a id="v:tyConAppTyCon_maybe" class="def">tyConAppTyCon_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> <a href="src/GHC.Core.Type.html#tyConAppTyCon_maybe" class="link">Source</a> <a href="#v:tyConAppTyCon_maybe" class="selflink">#</a></p><div class="doc"><p>The same as <code>fst . splitTyConApp</code></p></div></div><div class="top"><p class="src"><a id="v:tyConAppTyConPicky_maybe" class="def">tyConAppTyConPicky_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> <a href="src/GHC.Core.Type.html#tyConAppTyConPicky_maybe" class="link">Source</a> <a href="#v:tyConAppTyConPicky_maybe" class="selflink">#</a></p><div class="doc"><p>Retrieve the tycon heading this type, if there is one. Does <em>not</em>
 look through synonyms.</p></div></div><div class="top"><p class="src"><a id="v:tyConAppArgs_maybe" class="def">tyConAppArgs_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.Type.html#tyConAppArgs_maybe" class="link">Source</a> <a href="#v:tyConAppArgs_maybe" class="selflink">#</a></p><div class="doc"><p>The same as <code>snd . splitTyConApp</code></p></div></div><div class="top"><p class="src"><a id="v:tyConAppTyCon" class="def">tyConAppTyCon</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> <a href="src/GHC.Core.Type.html#tyConAppTyCon" class="link">Source</a> <a href="#v:tyConAppTyCon" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyConAppArgs" class="def">tyConAppArgs</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.Type.html#tyConAppArgs" class="link">Source</a> <a href="#v:tyConAppArgs" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:splitTyConApp_maybe" class="def">splitTyConApp_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]) <a href="src/GHC.Core.Type.html#splitTyConApp_maybe" class="link">Source</a> <a href="#v:splitTyConApp_maybe" class="selflink">#</a></p><div class="doc"><p>Attempts to tease a type apart into a type constructor and the application
 of a number of arguments to that constructor</p></div></div><div class="top"><p class="src"><a id="v:splitTyConApp" class="def">splitTyConApp</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]) <a href="src/GHC.Core.Type.html#splitTyConApp" class="link">Source</a> <a href="#v:splitTyConApp" class="selflink">#</a></p><div class="doc"><p>Attempts to tease a type apart into a type constructor and the application
 of a number of arguments to that constructor. Panics if that is not possible.
 See also <code><a href="GHC-Core-Type.html#v:splitTyConApp_maybe" title="GHC.Core.Type">splitTyConApp_maybe</a></code></p></div></div><div class="top"><p class="src"><a id="v:tyConAppArgN" class="def">tyConAppArgN</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#tyConAppArgN" class="link">Source</a> <a href="#v:tyConAppArgN" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tcSplitTyConApp_maybe" class="def">tcSplitTyConApp_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]) <a href="src/GHC.Core.Type.html#tcSplitTyConApp_maybe" class="link">Source</a> <a href="#v:tcSplitTyConApp_maybe" class="selflink">#</a></p><div class="doc"><p>Split a type constructor application into its type constructor and
 applied types. Note that this may fail in the case of a <code><a href="GHC-Core-TyCo-Rep.html#v:FunTy" title="GHC.Core.TyCo.Rep">FunTy</a></code> with an
 argument of unknown kind <code><a href="GHC-Core-TyCo-Rep.html#v:FunTy" title="GHC.Core.TyCo.Rep">FunTy</a></code> (e.g. <code>FunTy (a :: k) Int</code>. since the kind
 of <code>a</code> isn't of the form <code>TYPE rep</code>). Consequently, you may need to zonk your
 type before using this function.</p><p>If you only need the <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code>, consider using <code>tcTyConAppTyCon_maybe</code>.</p></div></div><div class="top"><p class="src"><a id="v:splitListTyConApp_maybe" class="def">splitListTyConApp_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#splitListTyConApp_maybe" class="link">Source</a> <a href="#v:splitListTyConApp_maybe" class="selflink">#</a></p><div class="doc"><p>Attempts to tease a list type apart and gives the type of the elements if
 successful (looks through type synonyms)</p></div></div><div class="top"><p class="src"><a id="v:repSplitTyConApp_maybe" class="def">repSplitTyConApp_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]) <a href="src/GHC.Core.Type.html#repSplitTyConApp_maybe" class="link">Source</a> <a href="#v:repSplitTyConApp_maybe" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:splitTyConApp_maybe" title="GHC.Core.Type">splitTyConApp_maybe</a></code>, but doesn't look through synonyms. This
 assumes the synonyms have already been dealt with.</p><p>Moreover, for a FunTy, it only succeeds if the argument types
 have enough info to extract the runtime-rep arguments that
 the funTyCon requires.  This will usually be true;
 but may be temporarily false during canonicalization:
     see Note [FunTy and decomposing tycon applications] in <a href="GHC-Tc-Solver-Canonical.html">GHC.Tc.Solver.Canonical</a></p></div></div><div class="top"><p class="src"><a id="v:mkForAllTy" class="def">mkForAllTy</a> :: <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkForAllTy" class="link">Source</a> <a href="#v:mkForAllTy" class="selflink">#</a></p><div class="doc"><p>Like <code>mkTyCoForAllTy</code>, but does not check the occurrence of the binder
 See Note [Unused coercion variable in ForAllTy]</p></div></div><div class="top"><p class="src"><a id="v:mkForAllTys" class="def">mkForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyCoVarBinder" title="GHC.Core.Type">TyCoVarBinder</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkForAllTys" class="link">Source</a> <a href="#v:mkForAllTys" class="selflink">#</a></p><div class="doc"><p>Wraps foralls over the type using the provided <code><a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a></code>s from left to right</p></div></div><div class="top"><p class="src"><a id="v:mkInvisForAllTys" class="def">mkInvisForAllTys</a> :: [<a href="GHC-Types-Var.html#t:InvisTVBinder" title="GHC.Types.Var">InvisTVBinder</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkInvisForAllTys" class="link">Source</a> <a href="#v:mkInvisForAllTys" class="selflink">#</a></p><div class="doc"><p>Wraps foralls over the type using the provided <code><a href="GHC-Types-Var.html#t:InvisTVBinder" title="GHC.Types.Var">InvisTVBinder</a></code>s from left to right</p></div></div><div class="top"><p class="src"><a id="v:mkTyCoInvForAllTys" class="def">mkTyCoInvForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkTyCoInvForAllTys" class="link">Source</a> <a href="#v:mkTyCoInvForAllTys" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:mkForAllTys" title="GHC.Core.Type">mkForAllTys</a></code>, but assumes all variables are dependent and
 <code><a href="GHC-Core-Type.html#v:Inferred" title="GHC.Core.Type">Inferred</a></code>, a common case</p></div></div><div class="top"><p class="src"><a id="v:mkSpecForAllTy" class="def">mkSpecForAllTy</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkSpecForAllTy" class="link">Source</a> <a href="#v:mkSpecForAllTy" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:mkForAllTy" title="GHC.Core.Type">mkForAllTy</a></code>, but assumes the variable is dependent and <code><a href="GHC-Core-Type.html#v:Specified" title="GHC.Core.Type">Specified</a></code>,
 a common case</p></div></div><div class="top"><p class="src"><a id="v:mkSpecForAllTys" class="def">mkSpecForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkSpecForAllTys" class="link">Source</a> <a href="#v:mkSpecForAllTys" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:mkForAllTys" title="GHC.Core.Type">mkForAllTys</a></code>, but assumes all variables are dependent and
 <code><a href="GHC-Core-Type.html#v:Specified" title="GHC.Core.Type">Specified</a></code>, a common case</p></div></div><div class="top"><p class="src"><a id="v:mkVisForAllTys" class="def">mkVisForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkVisForAllTys" class="link">Source</a> <a href="#v:mkVisForAllTys" class="selflink">#</a></p><div class="doc"><p>Like mkForAllTys, but assumes all variables are dependent and visible</p></div></div><div class="top"><p class="src"><a id="v:mkTyCoInvForAllTy" class="def">mkTyCoInvForAllTy</a> :: <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkTyCoInvForAllTy" class="link">Source</a> <a href="#v:mkTyCoInvForAllTy" class="selflink">#</a></p><div class="doc"><p>Make a dependent forall over an <code><a href="GHC-Core-Type.html#v:Inferred" title="GHC.Core.Type">Inferred</a></code> variable</p></div></div><div class="top"><p class="src"><a id="v:mkInfForAllTy" class="def">mkInfForAllTy</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkInfForAllTy" class="link">Source</a> <a href="#v:mkInfForAllTy" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:mkTyCoInvForAllTy" title="GHC.Core.Type">mkTyCoInvForAllTy</a></code>, but tv should be a tyvar</p></div></div><div class="top"><p class="src"><a id="v:mkInfForAllTys" class="def">mkInfForAllTys</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkInfForAllTys" class="link">Source</a> <a href="#v:mkInfForAllTys" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:mkTyCoInvForAllTys" title="GHC.Core.Type">mkTyCoInvForAllTys</a></code>, but tvs should be a list of tyvar</p></div></div><div class="top"><p class="src"><a id="v:splitForAllTys" class="def">splitForAllTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitForAllTys" class="link">Source</a> <a href="#v:splitForAllTys" class="selflink">#</a></p><div class="doc"><p>Take a ForAllTy apart, returning the list of tycovars and the result type.
 This always succeeds, even if it returns only an empty list. Note that the
 result type returned may have free variables that were bound by a forall.</p></div></div><div class="top"><p class="src"><a id="v:splitForAllTysReq" class="def">splitForAllTysReq</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Types-Var.html#t:ReqTVBinder" title="GHC.Types.Var">ReqTVBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitForAllTysReq" class="link">Source</a> <a href="#v:splitForAllTysReq" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:splitForAllTys" title="GHC.Core.Type">splitForAllTys</a></code>, but only splits <code><a href="GHC-Core-TyCo-Rep.html#v:ForAllTy" title="GHC.Core.TyCo.Rep">ForAllTy</a></code>s with <code><a href="GHC-Core-Type.html#v:Required" title="GHC.Core.Type">Required</a></code> type
 variable binders. Furthermore, each returned tyvar is annotated with <code>()</code>.</p></div></div><div class="top"><p class="src"><a id="v:splitForAllTysInvis" class="def">splitForAllTysInvis</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Types-Var.html#t:InvisTVBinder" title="GHC.Types.Var">InvisTVBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitForAllTysInvis" class="link">Source</a> <a href="#v:splitForAllTysInvis" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:splitForAllTys" title="GHC.Core.Type">splitForAllTys</a></code>, but only splits <code><a href="GHC-Core-TyCo-Rep.html#v:ForAllTy" title="GHC.Core.TyCo.Rep">ForAllTy</a></code>s with <code><a href="GHC-Core-Type.html#v:Invisible" title="GHC.Core.Type">Invisible</a></code> type
 variable binders. Furthermore, each returned tyvar is annotated with its
 <code><a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:splitForAllVarBndrs" class="def">splitForAllVarBndrs</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoVarBinder" title="GHC.Core.Type">TyCoVarBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitForAllVarBndrs" class="link">Source</a> <a href="#v:splitForAllVarBndrs" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:splitPiTys" title="GHC.Core.Type">splitPiTys</a></code> but split off only <em>named</em> binders
   and returns TyCoVarBinders rather than TyCoBinders</p></div></div><div class="top"><p class="src"><a id="v:splitForAllTy_maybe" class="def">splitForAllTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitForAllTy_maybe" class="link">Source</a> <a href="#v:splitForAllTy_maybe" class="selflink">#</a></p><div class="doc"><p>Attempts to take a forall type apart, but only if it's a proper forall,
 with a named binder</p></div></div><div class="top"><p class="src"><a id="v:splitForAllTy" class="def">splitForAllTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitForAllTy" class="link">Source</a> <a href="#v:splitForAllTy" class="selflink">#</a></p><div class="doc"><p>Take a forall type apart, or panics if that is not possible.</p></div></div><div class="top"><p class="src"><a id="v:splitForAllTy_ty_maybe" class="def">splitForAllTy_ty_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitForAllTy_ty_maybe" class="link">Source</a> <a href="#v:splitForAllTy_ty_maybe" class="selflink">#</a></p><div class="doc"><p>Like splitForAllTy_maybe, but only returns Just if it is a tyvar binder.</p></div></div><div class="top"><p class="src"><a id="v:splitForAllTy_co_maybe" class="def">splitForAllTy_co_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitForAllTy_co_maybe" class="link">Source</a> <a href="#v:splitForAllTy_co_maybe" class="selflink">#</a></p><div class="doc"><p>Like splitForAllTy_maybe, but only returns Just if it is a covar binder.</p></div></div><div class="top"><p class="src"><a id="v:splitPiTy_maybe" class="def">splitPiTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitPiTy_maybe" class="link">Source</a> <a href="#v:splitPiTy_maybe" class="selflink">#</a></p><div class="doc"><p>Attempts to take a forall type apart; works with proper foralls and
 functions</p></div></div><div class="top"><p class="src"><a id="v:splitPiTy" class="def">splitPiTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitPiTy" class="link">Source</a> <a href="#v:splitPiTy" class="selflink">#</a></p><div class="doc"><p>Takes a forall type apart, or panics</p></div></div><div class="top"><p class="src"><a id="v:splitPiTys" class="def">splitPiTys</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitPiTys" class="link">Source</a> <a href="#v:splitPiTys" class="selflink">#</a></p><div class="doc"><p>Split off all TyCoBinders to a type, splitting both proper foralls
 and functions</p></div></div><div class="top"><p class="src"><a id="v:mkTyConBindersPreferAnon" class="def">mkTyConBindersPreferAnon</a> <a href="src/GHC.Core.Type.html#mkTyConBindersPreferAnon" class="link">Source</a> <a href="#v:mkTyConBindersPreferAnon" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>]</td><td class="doc"><p>binders</p></td></tr><tr><td class="src">-&gt; <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a></td><td class="doc"><p>free variables of result</p></td></tr><tr><td class="src">-&gt; [<a href="GHC-Core-TyCon.html#t:TyConBinder" title="GHC.Core.TyCon">TyConBinder</a>]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Given a list of type-level vars and the free vars of a result kind,
 makes TyCoBinders, preferring anonymous binders
 if the variable is, in fact, not dependent.
 e.g.    mkTyConBindersPreferAnon <a href="k-&gt;k">(k:*),(b:k),(c:k)</a>
 We want (k:*) Named, (b:k) Anon, (c:k) Anon</p><p>All non-coercion binders are <em>visible</em>.</p></div></div><div class="top"><p class="src"><a id="v:mkPiTy" class="def">mkPiTy</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkPiTy" class="link">Source</a> <a href="#v:mkPiTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mkPiTys" class="def">mkPiTys</a> :: [<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#mkPiTys" class="link">Source</a> <a href="#v:mkPiTys" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:piResultTy" class="def">piResultTy</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#piResultTy" class="link">Source</a> <a href="#v:piResultTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:piResultTys" class="def">piResultTys</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#piResultTys" class="link">Source</a> <a href="#v:piResultTys" class="selflink">#</a></p><div class="doc"><p>(piResultTys f_ty [ty1, .., tyn]) gives the type of (f ty1 .. tyn)
   where f :: f_ty
 <code><a href="GHC-Core-Type.html#v:piResultTys" title="GHC.Core.Type">piResultTys</a></code> is interesting because:
      1. <code>f_ty</code> may have more for-alls than there are args
      2. Less obviously, it may have fewer for-alls
 For case 2. think of:
   piResultTys (forall a.a) [forall b.b, Int]
 This really can happen, but only (I think) in situations involving
 undefined.  For example:
       undefined :: forall a. a
 Term: undefined <code>(forall b. b-&gt;b) </code>Int
 This term should have type (Int -&gt; Int), but notice that
 there are more type args than foralls in <code><a href="GHC-Prelude.html#v:undefined" title="GHC.Prelude">undefined</a></code>s type.</p></div></div><div class="top"><p class="src"><a id="v:applyTysX" class="def">applyTysX</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#applyTysX" class="link">Source</a> <a href="#v:applyTysX" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:dropForAlls" class="def">dropForAlls</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#dropForAlls" class="link">Source</a> <a href="#v:dropForAlls" class="selflink">#</a></p><div class="doc"><p>Drops all ForAllTys</p></div></div><div class="top"><p class="src"><a id="v:mkFamilyTyConApp" class="def">mkFamilyTyConApp</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkFamilyTyConApp" class="link">Source</a> <a href="#v:mkFamilyTyConApp" class="selflink">#</a></p><div class="doc"><p>Given a family instance TyCon and its arg types, return the
 corresponding family type.  E.g:</p><pre>data family T a
data instance T (Maybe b) = MkT b</pre><p>Where the instance tycon is :RTL, so:</p><pre>mkFamilyTyConApp :RTL Int  =  T (Maybe Int)</pre></div></div><div class="top"><p class="src"><a id="v:buildSynTyCon" class="def">buildSynTyCon</a> <a href="src/GHC.Core.Type.html#buildSynTyCon" class="link">Source</a> <a href="#v:buildSynTyCon" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="GHC-Types-Name.html#t:Name" title="GHC.Types.Name">Name</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; [<a href="GHC-Core-Type.html#t:KnotTied" title="GHC.Core.Type">KnotTied</a> <a href="GHC-Core-TyCon.html#t:TyConBinder" title="GHC.Core.TyCon">TyConBinder</a>]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></td><td class="doc"><p><em>result</em> kind</p></td></tr><tr><td class="src">-&gt; [<a href="GHC-Core-TyCon.html#t:Role" title="GHC.Core.TyCon">Role</a>]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="GHC-Core-Type.html#t:KnotTied" title="GHC.Core.Type">KnotTied</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a id="v:mkNumLitTy" class="def">mkNumLitTy</a> :: <a href="GHC-Prelude.html#t:Integer" title="GHC.Prelude">Integer</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkNumLitTy" class="link">Source</a> <a href="#v:mkNumLitTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isNumLitTy" class="def">isNumLitTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Prelude.html#t:Integer" title="GHC.Prelude">Integer</a> <a href="src/GHC.Core.Type.html#isNumLitTy" class="link">Source</a> <a href="#v:isNumLitTy" class="selflink">#</a></p><div class="doc"><p>Is this a numeric literal. We also look through type synonyms.</p></div></div><div class="top"><p class="src"><a id="v:mkStrLitTy" class="def">mkStrLitTy</a> :: <a href="GHC-Data-FastString.html#t:FastString" title="GHC.Data.FastString">FastString</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkStrLitTy" class="link">Source</a> <a href="#v:mkStrLitTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isStrLitTy" class="def">isStrLitTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Data-FastString.html#t:FastString" title="GHC.Data.FastString">FastString</a> <a href="src/GHC.Core.Type.html#isStrLitTy" class="link">Source</a> <a href="#v:isStrLitTy" class="selflink">#</a></p><div class="doc"><p>Is this a symbol literal. We also look through type synonyms.</p></div></div><div class="top"><p class="src"><a id="v:isLitTy" class="def">isLitTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-TyCo-Rep.html#t:TyLit" title="GHC.Core.TyCo.Rep">TyLit</a> <a href="src/GHC.Core.Type.html#isLitTy" class="link">Source</a> <a href="#v:isLitTy" class="selflink">#</a></p><div class="doc"><p>Is this a type literal (symbol or numeric).</p></div></div><div class="top"><p class="src"><a id="v:isPredTy" class="def">isPredTy</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isPredTy" class="link">Source</a> <a href="#v:isPredTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getRuntimeRep_maybe" class="def">getRuntimeRep_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#getRuntimeRep_maybe" class="link">Source</a> <a href="#v:getRuntimeRep_maybe" class="selflink">#</a></p><div class="doc"><p>Extract the RuntimeRep classifier of a type. For instance,
 <code>getRuntimeRep_maybe Int = LiftedRep</code>. Returns <code><a href="GHC-Prelude.html#v:Nothing" title="GHC.Prelude">Nothing</a></code> if this is not
 possible.</p></div></div><div class="top"><p class="src"><a id="v:kindRep_maybe" class="def">kindRep_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#kindRep_maybe" class="link">Source</a> <a href="#v:kindRep_maybe" class="selflink">#</a></p><div class="doc"><p>Given a kind (TYPE rr), extract its RuntimeRep classifier rr.
 For example, <code>kindRep_maybe * = Just LiftedRep</code>
 Returns <code><a href="GHC-Prelude.html#v:Nothing" title="GHC.Prelude">Nothing</a></code> if the kind is not of form (TYPE rr)
 Treats * and Constraint as the same</p></div></div><div class="top"><p class="src"><a id="v:kindRep" class="def">kindRep</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#kindRep" class="link">Source</a> <a href="#v:kindRep" class="selflink">#</a></p><div class="doc"><p>Extract the RuntimeRep classifier of a type from its kind. For example,
 <code>kindRep * = LiftedRep</code>; Panics if this is not possible.
 Treats * and Constraint as the same</p></div></div><div class="top"><p class="src"><a id="v:mkCastTy" class="def">mkCastTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkCastTy" class="link">Source</a> <a href="#v:mkCastTy" class="selflink">#</a></p><div class="doc"><p>Make a <code><a href="GHC-Core-TyCo-Rep.html#v:CastTy" title="GHC.Core.TyCo.Rep">CastTy</a></code>. The Coercion must be nominal. Checks the
 Coercion for reflexivity, dropping it if it's reflexive.
 See Note [Respecting definitional equality] in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p></div></div><div class="top"><p class="src"><a id="v:mkCoercionTy" class="def">mkCoercionTy</a> :: <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#mkCoercionTy" class="link">Source</a> <a href="#v:mkCoercionTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:splitCastTy_maybe" class="def">splitCastTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>) <a href="src/GHC.Core.Type.html#splitCastTy_maybe" class="link">Source</a> <a href="#v:splitCastTy_maybe" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:userTypeError_maybe" class="def">userTypeError_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#userTypeError_maybe" class="link">Source</a> <a href="#v:userTypeError_maybe" class="selflink">#</a></p><div class="doc"><p>Is this type a custom user error?
 If so, give us the kind and the error message.</p></div></div><div class="top"><p class="src"><a id="v:pprUserTypeErrorTy" class="def">pprUserTypeErrorTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Core.Type.html#pprUserTypeErrorTy" class="link">Source</a> <a href="#v:pprUserTypeErrorTy" class="selflink">#</a></p><div class="doc"><p>Render a type corresponding to a user type error into a SDoc.</p></div></div><div class="top"><p class="src"><a id="v:coAxNthLHS" class="def">coAxNthLHS</a> :: <a href="GHC-Core-Coercion-Axiom.html#t:CoAxiom" title="GHC.Core.Coercion.Axiom">CoAxiom</a> br -&gt; <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#coAxNthLHS" class="link">Source</a> <a href="#v:coAxNthLHS" class="selflink">#</a></p><div class="doc"><p>Get the type on the LHS of a coercion induced by a type/data
 family instance.</p></div></div><div class="top"><p class="src"><a id="v:stripCoercionTy" class="def">stripCoercionTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> <a href="src/GHC.Core.Type.html#stripCoercionTy" class="link">Source</a> <a href="#v:stripCoercionTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:splitPiTysInvisible" class="def">splitPiTysInvisible</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitPiTysInvisible" class="link">Source</a> <a href="#v:splitPiTysInvisible" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:splitPiTysInvisibleN" class="def">splitPiTysInvisibleN</a> :: <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; ([<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>], <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.Type.html#splitPiTysInvisibleN" class="link">Source</a> <a href="#v:splitPiTysInvisibleN" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:invisibleTyBndrCount" class="def">invisibleTyBndrCount</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> <a href="src/GHC.Core.Type.html#invisibleTyBndrCount" class="link">Source</a> <a href="#v:invisibleTyBndrCount" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:filterOutInvisibleTypes" class="def">filterOutInvisibleTypes</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.Type.html#filterOutInvisibleTypes" class="link">Source</a> <a href="#v:filterOutInvisibleTypes" class="selflink">#</a></p><div class="doc"><p>Given a <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code> and a list of argument types, filter out any invisible
 (i.e., <code><a href="GHC-Core-Type.html#v:Inferred" title="GHC.Core.Type">Inferred</a></code> or <code><a href="GHC-Core-Type.html#v:Specified" title="GHC.Core.Type">Specified</a></code>) arguments.</p></div></div><div class="top"><p class="src"><a id="v:filterOutInferredTypes" class="def">filterOutInferredTypes</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.Type.html#filterOutInferredTypes" class="link">Source</a> <a href="#v:filterOutInferredTypes" class="selflink">#</a></p><div class="doc"><p>Given a <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code> and a list of argument types, filter out any <code><a href="GHC-Core-Type.html#v:Inferred" title="GHC.Core.Type">Inferred</a></code>
 arguments.</p></div></div><div class="top"><p class="src"><a id="v:partitionInvisibleTypes" class="def">partitionInvisibleTypes</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; ([<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>], [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]) <a href="src/GHC.Core.Type.html#partitionInvisibleTypes" class="link">Source</a> <a href="#v:partitionInvisibleTypes" class="selflink">#</a></p><div class="doc"><p>Given a <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code> and a list of argument types, partition the arguments
 into:</p><ol><li><code><a href="GHC-Core-Type.html#v:Inferred" title="GHC.Core.Type">Inferred</a></code> or <code><a href="GHC-Core-Type.html#v:Specified" title="GHC.Core.Type">Specified</a></code> (i.e., invisible) arguments and</li><li><code><a href="GHC-Core-Type.html#v:Required" title="GHC.Core.Type">Required</a></code> (i.e., visible) arguments</li></ol></div></div><div class="top"><p class="src"><a id="v:partitionInvisibles" class="def">partitionInvisibles</a> :: [(a, <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>)] -&gt; ([a], [a]) <a href="src/GHC.Core.Type.html#partitionInvisibles" class="link">Source</a> <a href="#v:partitionInvisibles" class="selflink">#</a></p><div class="doc"><p>Given a list of things paired with their visibilities, partition the
 things into (invisible things, visible things).</p></div></div><div class="top"><p class="src"><a id="v:tyConArgFlags" class="def">tyConArgFlags</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>] <a href="src/GHC.Core.Type.html#tyConArgFlags" class="link">Source</a> <a href="#v:tyConArgFlags" class="selflink">#</a></p><div class="doc"><p>Given a <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code> and a list of argument types to which the <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code> is
 applied, determine each argument's visibility
 (<code><a href="GHC-Core-Type.html#v:Inferred" title="GHC.Core.Type">Inferred</a></code>, <code><a href="GHC-Core-Type.html#v:Specified" title="GHC.Core.Type">Specified</a></code>, or <code><a href="GHC-Core-Type.html#v:Required" title="GHC.Core.Type">Required</a></code>).</p><p>Wrinkle: consider the following scenario:</p><pre>T :: forall k. k -&gt; k
tyConArgFlags T [forall m. m -&gt; m -&gt; m, S, R, Q]</pre><p>After substituting, we get</p><pre>T (forall m. m -&gt; m -&gt; m) :: (forall m. m -&gt; m -&gt; m) -&gt; forall n. n -&gt; n -&gt; n</pre><p>Thus, the first argument is invisible, <code>S</code> is visible, <code>R</code> is invisible again,
 and <code>Q</code> is visible.</p></div></div><div class="top"><p class="src"><a id="v:appTyArgFlags" class="def">appTyArgFlags</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>] <a href="src/GHC.Core.Type.html#appTyArgFlags" class="link">Source</a> <a href="#v:appTyArgFlags" class="selflink">#</a></p><div class="doc"><p>Given a <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code> and a list of argument types to which the <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code> is
 applied, determine each argument's visibility
 (<code><a href="GHC-Core-Type.html#v:Inferred" title="GHC.Core.Type">Inferred</a></code>, <code><a href="GHC-Core-Type.html#v:Specified" title="GHC.Core.Type">Specified</a></code>, or <code><a href="GHC-Core-Type.html#v:Required" title="GHC.Core.Type">Required</a></code>).</p><p>Most of the time, the arguments will be <code><a href="GHC-Core-Type.html#v:Required" title="GHC.Core.Type">Required</a></code>, but not always. Consider
 <code>f :: forall a. a -&gt; Type</code>. In <code>f Type Bool</code>, the first argument (<code>Type</code>) is
 <code><a href="GHC-Core-Type.html#v:Specified" title="GHC.Core.Type">Specified</a></code> and the second argument (<code>Bool</code>) is <code><a href="GHC-Core-Type.html#v:Required" title="GHC.Core.Type">Required</a></code>. It is precisely
 this sort of higher-rank situation in which <code><a href="GHC-Core-Type.html#v:appTyArgFlags" title="GHC.Core.Type">appTyArgFlags</a></code> comes in handy,
 since <code>f Type Bool</code> would be represented in Core using <code><a href="GHC-Core-TyCo-Rep.html#v:AppTy" title="GHC.Core.TyCo.Rep">AppTy</a></code>s.
 (See also #15792).</p></div></div><div class="top"><p class="src"><a id="v:synTyConResKind" class="def">synTyConResKind</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> <a href="src/GHC.Core.Type.html#synTyConResKind" class="link">Source</a> <a href="#v:synTyConResKind" class="selflink">#</a></p><div class="doc"><p>Find the result <code><a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></code> of a type synonym,
 after applying it to its <code>arity</code> number of type variables
 Actually this function works fine on data types too,
 but they'd always return <code><a href="GHC-Prelude.html#v:-42-" title="GHC.Prelude">*</a></code>, so we never need to ask</p></div></div><a href="#g:3" id="g:3"><h2>Analyzing types</h2></a><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:TyCoMapper" class="def">TyCoMapper</a> env m <a href="src/GHC.Core.Type.html#TyCoMapper" class="link">Source</a> <a href="#t:TyCoMapper" class="selflink">#</a></p><div class="doc"><p>This describes how a &quot;map&quot; operation over a type/coercion should behave</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:TyCoMapper" class="def">TyCoMapper</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:tcm_tyvar" class="def">tcm_tyvar</a> :: env -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; m <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:tcm_covar" class="def">tcm_covar</a> :: env -&gt; <a href="GHC-Types-Var.html#t:CoVar" title="GHC.Types.Var">CoVar</a> -&gt; m <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:tcm_hole" class="def">tcm_hole</a> :: env -&gt; <a href="GHC-Core-Coercion.html#t:CoercionHole" title="GHC.Core.Coercion">CoercionHole</a> -&gt; m <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a></dfn><div class="doc"><p>What to do with coercion holes.
 See Note [Coercion holes] in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a>.</p></div></li><li><dfn class="src"><a id="v:tcm_tycobinder" class="def">tcm_tycobinder</a> :: env -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; m (env, <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>)</dfn><div class="doc"><p>The returned env is used in the extended scope</p></div></li><li><dfn class="src"><a id="v:tcm_tycon" class="def">tcm_tycon</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; m <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></dfn><div class="doc"><p>This is used only for TcTyCons
 a) To zonk TcTyCons
 b) To turn TcTyCons into TyCons.
    See Note [Type checking recursive type and class declarations]
    in <a href="GHC-Tc-TyCl.html">GHC.Tc.TyCl</a></p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><a id="v:mapTyCo" class="def">mapTyCo</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; <a href="GHC-Core-Type.html#t:TyCoMapper" title="GHC.Core.Type">TyCoMapper</a> () m -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; m <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; m [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>], <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; m <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>, [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>] -&gt; m [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>]) <a href="src/GHC.Core.Type.html#mapTyCo" class="link">Source</a> <a href="#v:mapTyCo" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mapTyCoX" class="def">mapTyCoX</a> :: <a href="GHC-Prelude.html#t:Monad" title="GHC.Prelude">Monad</a> m =&gt; <a href="GHC-Core-Type.html#t:TyCoMapper" title="GHC.Core.Type">TyCoMapper</a> env m -&gt; (env -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; m <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>, env -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; m [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>], env -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; m <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>, env -&gt; [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>] -&gt; m [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>]) <a href="src/GHC.Core.Type.html#mapTyCoX" class="link">Source</a> <a href="#v:mapTyCoX" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:TyCoFolder" class="def">TyCoFolder</a> env a <a href="src/GHC.Core.TyCo.Rep.html#TyCoFolder" class="link">Source</a> <a href="#t:TyCoFolder" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:TyCoFolder" class="def">TyCoFolder</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:tcf_view" class="def">tcf_view</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:tcf_tyvar" class="def">tcf_tyvar</a> :: env -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; a</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:tcf_covar" class="def">tcf_covar</a> :: env -&gt; <a href="GHC-Types-Var.html#t:CoVar" title="GHC.Types.Var">CoVar</a> -&gt; a</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:tcf_hole" class="def">tcf_hole</a> :: env -&gt; <a href="GHC-Core-Coercion.html#t:CoercionHole" title="GHC.Core.Coercion">CoercionHole</a> -&gt; a</dfn><div class="doc"><p>What to do with coercion holes.
 See Note [Coercion holes] in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a>.</p></div></li><li><dfn class="src"><a id="v:tcf_tycobinder" class="def">tcf_tycobinder</a> :: env -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; env</dfn><div class="doc"><p>The returned env is used in the extended scope</p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><a id="v:foldTyCo" class="def">foldTyCo</a> :: <a href="GHC-Prelude.html#t:Monoid" title="GHC.Prelude">Monoid</a> a =&gt; <a href="GHC-Core-Type.html#t:TyCoFolder" title="GHC.Core.Type">TyCoFolder</a> env a -&gt; env -&gt; (<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; a, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; a, <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; a, [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>] -&gt; a) <a href="src/GHC.Core.TyCo.Rep.html#foldTyCo" class="link">Source</a> <a href="#v:foldTyCo" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:newTyConInstRhs" class="def">newTyConInstRhs</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#newTyConInstRhs" class="link">Source</a> <a href="#v:newTyConInstRhs" class="selflink">#</a></p><div class="doc"><p>Unwrap one <code>layer</code> of newtype on a type constructor and its
 arguments, using an eta-reduced version of the <code>newtype</code> if possible.
 This requires tys to have at least <code>newTyConInstArity tycon</code> elements.</p></div></div><a href="#g:4" id="g:4"><h2>Binders</h2></a><div class="top"><p class="src"><a id="v:sameVis" class="def">sameVis</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Types.Var.html#sameVis" class="link">Source</a> <a href="#v:sameVis" class="selflink">#</a></p><div class="doc"><p>Do these denote the same level of visibility? <code><a href="GHC-Core-Type.html#v:Required" title="GHC.Core.Type">Required</a></code>
 arguments are visible, others are not. So this function
 equates <code><a href="GHC-Core-Type.html#v:Specified" title="GHC.Core.Type">Specified</a></code> and <code><a href="GHC-Core-Type.html#v:Inferred" title="GHC.Core.Type">Inferred</a></code>. Used for printing.</p></div></div><div class="top"><p class="src"><a id="v:mkTyCoVarBinder" class="def">mkTyCoVarBinder</a> :: vis -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis <a href="src/GHC.Types.Var.html#mkTyCoVarBinder" class="link">Source</a> <a href="#v:mkTyCoVarBinder" class="selflink">#</a></p><div class="doc"><p>Make a named binder</p></div></div><div class="top"><p class="src"><a id="v:mkTyCoVarBinders" class="def">mkTyCoVarBinders</a> :: vis -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis] <a href="src/GHC.Types.Var.html#mkTyCoVarBinders" class="link">Source</a> <a href="#v:mkTyCoVarBinders" class="selflink">#</a></p><div class="doc"><p>Make many named binders</p></div></div><div class="top"><p class="src"><a id="v:mkTyVarBinder" class="def">mkTyVarBinder</a> :: vis -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> vis <a href="src/GHC.Types.Var.html#mkTyVarBinder" class="link">Source</a> <a href="#v:mkTyVarBinder" class="selflink">#</a></p><div class="doc"><p>Make a named binder
 <code>var</code> should be a type variable</p></div></div><div class="top"><p class="src"><a id="v:mkTyVarBinders" class="def">mkTyVarBinders</a> :: vis -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> vis] <a href="src/GHC.Types.Var.html#mkTyVarBinders" class="link">Source</a> <a href="#v:mkTyVarBinders" class="selflink">#</a></p><div class="doc"><p>Make many named binders
 Input vars should be type variables</p></div></div><div class="top"><p class="src"><a id="v:tyVarSpecToBinders" class="def">tyVarSpecToBinders</a> :: [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> a <a href="GHC-Core-Type.html#t:Specificity" title="GHC.Core.Type">Specificity</a>] -&gt; [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> a <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a>] <a href="src/GHC.Types.Var.html#tyVarSpecToBinders" class="link">Source</a> <a href="#v:tyVarSpecToBinders" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mkAnonBinder" class="def">mkAnonBinder</a> :: <a href="GHC-Core-Type.html#t:AnonArgFlag" title="GHC.Core.Type">AnonArgFlag</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> <a href="src/GHC.Core.Type.html#mkAnonBinder" class="link">Source</a> <a href="#v:mkAnonBinder" class="selflink">#</a></p><div class="doc"><p>Make an anonymous binder</p></div></div><div class="top"><p class="src"><a id="v:isAnonTyCoBinder" class="def">isAnonTyCoBinder</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isAnonTyCoBinder" class="link">Source</a> <a href="#v:isAnonTyCoBinder" class="selflink">#</a></p><div class="doc"><p>Does this binder bind a variable that is <em>not</em> erased? Returns
 <code><a href="GHC-Prelude.html#v:True" title="GHC.Prelude">True</a></code> for anonymous binders.</p></div></div><div class="top"><p class="src"><a id="v:binderVar" class="def">binderVar</a> :: <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv argf -&gt; tv <a href="src/GHC.Types.Var.html#binderVar" class="link">Source</a> <a href="#v:binderVar" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:binderVars" class="def">binderVars</a> :: [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv argf] -&gt; [tv] <a href="src/GHC.Types.Var.html#binderVars" class="link">Source</a> <a href="#v:binderVars" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:binderType" class="def">binderType</a> :: <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> argf -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Types.Var.html#binderType" class="link">Source</a> <a href="#v:binderType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:binderArgFlag" class="def">binderArgFlag</a> :: <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> tv argf -&gt; argf <a href="src/GHC.Types.Var.html#binderArgFlag" class="link">Source</a> <a href="#v:binderArgFlag" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyCoBinderType" class="def">tyCoBinderType</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#tyCoBinderType" class="link">Source</a> <a href="#v:tyCoBinderType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyCoBinderVar_maybe" class="def">tyCoBinderVar_maybe</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> <a href="src/GHC.Core.Type.html#tyCoBinderVar_maybe" class="link">Source</a> <a href="#v:tyCoBinderVar_maybe" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyBinderType" class="def">tyBinderType</a> :: <a href="GHC-Core-TyCo-Rep.html#t:TyBinder" title="GHC.Core.TyCo.Rep">TyBinder</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#tyBinderType" class="link">Source</a> <a href="#v:tyBinderType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:binderRelevantType_maybe" class="def">binderRelevantType_maybe</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#binderRelevantType_maybe" class="link">Source</a> <a href="#v:binderRelevantType_maybe" class="selflink">#</a></p><div class="doc"><p>Extract a relevant type, if there is one.</p></div></div><div class="top"><p class="src"><a id="v:isVisibleArgFlag" class="def">isVisibleArgFlag</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Types.Var.html#isVisibleArgFlag" class="link">Source</a> <a href="#v:isVisibleArgFlag" class="selflink">#</a></p><div class="doc"><p>Does this <code><a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></code> classify an argument that is written in Haskell?</p></div></div><div class="top"><p class="src"><a id="v:isInvisibleArgFlag" class="def">isInvisibleArgFlag</a> :: <a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Types.Var.html#isInvisibleArgFlag" class="link">Source</a> <a href="#v:isInvisibleArgFlag" class="selflink">#</a></p><div class="doc"><p>Does this <code><a href="GHC-Core-Type.html#t:ArgFlag" title="GHC.Core.Type">ArgFlag</a></code> classify an argument that is not written in Haskell?</p></div></div><div class="top"><p class="src"><a id="v:isVisibleBinder" class="def">isVisibleBinder</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.TyCo.Rep.html#isVisibleBinder" class="link">Source</a> <a href="#v:isVisibleBinder" class="selflink">#</a></p><div class="doc"><p>Does this binder bind a visible argument?</p></div></div><div class="top"><p class="src"><a id="v:isInvisibleBinder" class="def">isInvisibleBinder</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.TyCo.Rep.html#isInvisibleBinder" class="link">Source</a> <a href="#v:isInvisibleBinder" class="selflink">#</a></p><div class="doc"><p>Does this binder bind an invisible argument?</p></div></div><div class="top"><p class="src"><a id="v:isNamedBinder" class="def">isNamedBinder</a> :: <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.TyCo.Rep.html#isNamedBinder" class="link">Source</a> <a href="#v:isNamedBinder" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyConBindersTyCoBinders" class="def">tyConBindersTyCoBinders</a> :: [<a href="GHC-Core-TyCon.html#t:TyConBinder" title="GHC.Core.TyCon">TyConBinder</a>] -&gt; [<a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a>] <a href="src/GHC.Core.Type.html#tyConBindersTyCoBinders" class="link">Source</a> <a href="#v:tyConBindersTyCoBinders" class="selflink">#</a></p></div><a href="#g:5" id="g:5"><h2>Common type constructors</h2></a><div class="top"><p class="src"><a id="v:funTyCon" class="def">funTyCon</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> <a href="src/GHC.Builtin.Types.Prim.html#funTyCon" class="link">Source</a> <a href="#v:funTyCon" class="selflink">#</a></p><div class="doc"><p>The <code>FUN</code> type constructor.</p><pre>FUN :: forall {m :: Multiplicity} {rep1 :: RuntimeRep} {rep2 :: RuntimeRep}.
        TYPE rep1 -&gt; TYPE rep2 -&gt; *
</pre><p>The runtime representations quantification is left inferred. This
 means they cannot be specified with <code>-XTypeApplications</code>.</p><p>This is a deliberate choice to allow future extensions to the
 function arrow. To allow visible application a type synonym can be
 defined:</p><pre>type Arr :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep).
            TYPE rep1 -&gt; TYPE rep2 -&gt; Type
type Arr = FUN
</pre></div></div><div class="top"><p class="src"><a id="v:unrestrictedFunTyCon" class="def">unrestrictedFunTyCon</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> <a href="src/GHC.Builtin.Types.html#unrestrictedFunTyCon" class="link">Source</a> <a href="#v:unrestrictedFunTyCon" class="selflink">#</a></p></div><a href="#g:6" id="g:6"><h2>Predicates on types</h2></a><div class="top"><p class="src"><a id="v:isTyVarTy" class="def">isTyVarTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isTyVarTy" class="link">Source</a> <a href="#v:isTyVarTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isFunTy" class="def">isFunTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isFunTy" class="link">Source</a> <a href="#v:isFunTy" class="selflink">#</a></p><div class="doc"><p>Is this a function?</p></div></div><div class="top"><p class="src"><a id="v:isCoercionTy" class="def">isCoercionTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isCoercionTy" class="link">Source</a> <a href="#v:isCoercionTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isCoercionTy_maybe" class="def">isCoercionTy_maybe</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> <a href="src/GHC.Core.Type.html#isCoercionTy_maybe" class="link">Source</a> <a href="#v:isCoercionTy_maybe" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isForAllTy" class="def">isForAllTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isForAllTy" class="link">Source</a> <a href="#v:isForAllTy" class="selflink">#</a></p><div class="doc"><p>Checks whether this is a proper forall (with a named binder)</p></div></div><div class="top"><p class="src"><a id="v:isForAllTy_ty" class="def">isForAllTy_ty</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isForAllTy_ty" class="link">Source</a> <a href="#v:isForAllTy_ty" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:isForAllTy" title="GHC.Core.Type">isForAllTy</a></code>, but returns True only if it is a tyvar binder</p></div></div><div class="top"><p class="src"><a id="v:isForAllTy_co" class="def">isForAllTy_co</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isForAllTy_co" class="link">Source</a> <a href="#v:isForAllTy_co" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="GHC-Core-Type.html#v:isForAllTy" title="GHC.Core.Type">isForAllTy</a></code>, but returns True only if it is a covar binder</p></div></div><div class="top"><p class="src"><a id="v:isPiTy" class="def">isPiTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isPiTy" class="link">Source</a> <a href="#v:isPiTy" class="selflink">#</a></p><div class="doc"><p>Is this a function or forall?</p></div></div><div class="top"><p class="src"><a id="v:isTauTy" class="def">isTauTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isTauTy" class="link">Source</a> <a href="#v:isTauTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isFamFreeTy" class="def">isFamFreeTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isFamFreeTy" class="link">Source</a> <a href="#v:isFamFreeTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isCoVarType" class="def">isCoVarType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isCoVarType" class="link">Source</a> <a href="#v:isCoVarType" class="selflink">#</a></p><div class="doc"><p>Does this type classify a core (unlifted) Coercion?
 At either role nominal or representational
    (t1 ~# t2) or (t1 ~R# t2)
 See Note [Types for coercions, predicates, and evidence] in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a></p></div></div><div class="top"><p class="src"><a id="v:isAtomicTy" class="def">isAtomicTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isAtomicTy" class="link">Source</a> <a href="#v:isAtomicTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isValidJoinPointType" class="def">isValidJoinPointType</a> :: <a href="GHC-Types-Basic.html#t:JoinArity" title="GHC.Types.Basic">JoinArity</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isValidJoinPointType" class="link">Source</a> <a href="#v:isValidJoinPointType" class="selflink">#</a></p><div class="doc"><p>Determine whether a type could be the type of a join point of given total
 arity, according to the polymorphism rule. A join point cannot be polymorphic
 in its return type, since given
   join j <code>a </code>b x y z = e1 in e2,
 the types of e1 and e2 must be the same, and a and b are not in scope for e2.
 (See Note [The polymorphism rule of join points] in <a href="GHC-Core.html">GHC.Core</a>.) Returns False
 also if the type simply doesn't have enough arguments.</p><p>Note that we need to know how many arguments (type *and* value) the putative
 join point takes; for instance, if
   j :: forall a. a -&gt; Int
 then j could be a binary join point returning an Int, but it could *not* be a
 unary join point returning a -&gt; Int.</p><p>TODO: See Note [Excess polymorphism and join points]</p></div></div><div class="top"><p class="src"><a id="v:tyConAppNeedsKindSig" class="def">tyConAppNeedsKindSig</a> <a href="src/GHC.Core.Type.html#tyConAppNeedsKindSig" class="link">Source</a> <a href="#v:tyConAppNeedsKindSig" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></td><td class="doc"><p>Should specified binders count towards injective positions in
   the kind of the TyCon? (If you're using visible kind
   applications, then you want True here.</p></td></tr><tr><td class="src">-&gt; <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a></td><td class="doc"><p>The number of args the <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code> is applied to.</p></td></tr><tr><td class="src">-&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a></td><td class="doc"><p>Does <code>T t_1 ... t_n</code> need a kind signature? (Where <code>n</code> is the
   number of arguments)</p></td></tr></table></div><div class="doc"><p>Does a <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code> (that is applied to some number of arguments) need to be
 ascribed with an explicit kind signature to resolve ambiguity if rendered as
 a source-syntax type?
 (See <code>Note [When does a tycon application need an explicit kind signature?]</code>
 for a full explanation of what this function checks for.)</p></div></div><a href="#g:7" id="g:7"><h3>Levity and boxity</h3></a><div class="top"><p class="src"><a id="v:isLiftedType_maybe" class="def">isLiftedType_maybe</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isLiftedType_maybe" class="link">Source</a> <a href="#v:isLiftedType_maybe" class="selflink">#</a></p><div class="doc"><p>Returns Just True if this type is surely lifted, Just False
 if it is surely unlifted, Nothing if we can't be sure (i.e., it is
 levity polymorphic), and panics if the kind does not have the shape
 TYPE r.</p></div></div><div class="top"><p class="src"><a id="v:isLiftedTypeKind" class="def">isLiftedTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isLiftedTypeKind" class="link">Source</a> <a href="#v:isLiftedTypeKind" class="selflink">#</a></p><div class="doc"><p>This version considers Constraint to be the same as *. Returns True
 if the argument is equivalent to Type/Constraint and False otherwise.
 See Note [Kind Constraint and kind Type]</p></div></div><div class="top"><p class="src"><a id="v:isUnliftedTypeKind" class="def">isUnliftedTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isUnliftedTypeKind" class="link">Source</a> <a href="#v:isUnliftedTypeKind" class="selflink">#</a></p><div class="doc"><p>Returns True if the kind classifies unlifted types and False otherwise.
 Note that this returns False for levity-polymorphic kinds, which may
 be specialized to a kind that classifies unlifted types.</p></div></div><div class="top"><p class="src"><a id="v:isLiftedRuntimeRep" class="def">isLiftedRuntimeRep</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isLiftedRuntimeRep" class="link">Source</a> <a href="#v:isLiftedRuntimeRep" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isUnliftedRuntimeRep" class="def">isUnliftedRuntimeRep</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isUnliftedRuntimeRep" class="link">Source</a> <a href="#v:isUnliftedRuntimeRep" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isUnliftedType" class="def">isUnliftedType</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isUnliftedType" class="link">Source</a> <a href="#v:isUnliftedType" class="selflink">#</a></p><div class="doc"><p>See <a href="Type.html#type_classification">Type</a> for what an unlifted type is.
 Panics on levity polymorphic types; See <code><a href="GHC-Core-Type.html#v:mightBeUnliftedType" title="GHC.Core.Type">mightBeUnliftedType</a></code> for
 a more approximate predicate that behaves better in the presence of
 levity polymorphism.</p></div></div><div class="top"><p class="src"><a id="v:mightBeUnliftedType" class="def">mightBeUnliftedType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#mightBeUnliftedType" class="link">Source</a> <a href="#v:mightBeUnliftedType" class="selflink">#</a></p><div class="doc"><p>Returns:</p><ul><li><code><a href="GHC-Prelude.html#v:False" title="GHC.Prelude">False</a></code> if the type is <em>guaranteed</em> lifted or</li><li><code><a href="GHC-Prelude.html#v:True" title="GHC.Prelude">True</a></code> if it is unlifted, OR we aren't sure (e.g. in a levity-polymorphic case)</li></ul></div></div><div class="top"><p class="src"><a id="v:isUnboxedTupleType" class="def">isUnboxedTupleType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isUnboxedTupleType" class="link">Source</a> <a href="#v:isUnboxedTupleType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isUnboxedSumType" class="def">isUnboxedSumType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isUnboxedSumType" class="link">Source</a> <a href="#v:isUnboxedSumType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isAlgType" class="def">isAlgType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isAlgType" class="link">Source</a> <a href="#v:isAlgType" class="selflink">#</a></p><div class="doc"><p>See <a href="Type.html#type_classification">Type</a> for what an algebraic type is.
 Should only be applied to <em>types</em>, as opposed to e.g. partially
 saturated type constructors</p></div></div><div class="top"><p class="src"><a id="v:isDataFamilyAppType" class="def">isDataFamilyAppType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isDataFamilyAppType" class="link">Source</a> <a href="#v:isDataFamilyAppType" class="selflink">#</a></p><div class="doc"><p>Check whether a type is a data family type</p></div></div><div class="top"><p class="src"><a id="v:isPrimitiveType" class="def">isPrimitiveType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isPrimitiveType" class="link">Source</a> <a href="#v:isPrimitiveType" class="selflink">#</a></p><div class="doc"><p>Returns true of types that are opaque to Haskell.</p></div></div><div class="top"><p class="src"><a id="v:isStrictType" class="def">isStrictType</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isStrictType" class="link">Source</a> <a href="#v:isStrictType" class="selflink">#</a></p><div class="doc"><p>Computes whether an argument (or let right hand side) should
 be computed strictly or lazily, based only on its type.
 Currently, it's just <code><a href="GHC-Core-Type.html#v:isUnliftedType" title="GHC.Core.Type">isUnliftedType</a></code>. Panics on levity-polymorphic types.</p></div></div><div class="top"><p class="src"><a id="v:isRuntimeRepTy" class="def">isRuntimeRepTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isRuntimeRepTy" class="link">Source</a> <a href="#v:isRuntimeRepTy" class="selflink">#</a></p><div class="doc"><p>Is this the type <code><a href="GHC-Core-TyCon.html#v:RuntimeRep" title="GHC.Core.TyCon">RuntimeRep</a></code>?</p></div></div><div class="top"><p class="src"><a id="v:isRuntimeRepVar" class="def">isRuntimeRepVar</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isRuntimeRepVar" class="link">Source</a> <a href="#v:isRuntimeRepVar" class="selflink">#</a></p><div class="doc"><p>Is a tyvar of type <code><a href="GHC-Core-TyCon.html#v:RuntimeRep" title="GHC.Core.TyCon">RuntimeRep</a></code>?</p></div></div><div class="top"><p class="src"><a id="v:isRuntimeRepKindedTy" class="def">isRuntimeRepKindedTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isRuntimeRepKindedTy" class="link">Source</a> <a href="#v:isRuntimeRepKindedTy" class="selflink">#</a></p><div class="doc"><p>Is this a type of kind RuntimeRep? (e.g. LiftedRep)</p></div></div><div class="top"><p class="src"><a id="v:dropRuntimeRepArgs" class="def">dropRuntimeRepArgs</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.Type.html#dropRuntimeRepArgs" class="link">Source</a> <a href="#v:dropRuntimeRepArgs" class="selflink">#</a></p><div class="doc"><p>Drops prefix of RuntimeRep constructors in <code><a href="GHC-Core-TyCo-Rep.html#v:TyConApp" title="GHC.Core.TyCo.Rep">TyConApp</a></code>s. Useful for e.g.
 dropping 'LiftedRep arguments of unboxed tuple TyCon applications:</p><p>dropRuntimeRepArgs [ 'LiftedRep, 'IntRep
                      , String, Int# ] == [String, Int#]</p></div></div><div class="top"><p class="src"><a id="v:getRuntimeRep" class="def">getRuntimeRep</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#getRuntimeRep" class="link">Source</a> <a href="#v:getRuntimeRep" class="selflink">#</a></p><div class="doc"><p>Extract the RuntimeRep classifier of a type. For instance,
 <code>getRuntimeRep_maybe Int = LiftedRep</code>. Panics if this is not possible.</p></div></div><a href="#g:8" id="g:8"><h1>Multiplicity</h1></a><div class="top"><p class="src"><a id="v:isMultiplicityTy" class="def">isMultiplicityTy</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isMultiplicityTy" class="link">Source</a> <a href="#v:isMultiplicityTy" class="selflink">#</a></p><div class="doc"><p>Is this the type <code>Multiplicity</code>?</p></div></div><div class="top"><p class="src"><a id="v:isMultiplicityVar" class="def">isMultiplicityVar</a> :: <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isMultiplicityVar" class="link">Source</a> <a href="#v:isMultiplicityVar" class="selflink">#</a></p><div class="doc"><p>Is a tyvar of type <code>Multiplicity</code>?</p></div></div><div class="top"><p class="src"><a id="v:unrestricted" class="def">unrestricted</a> :: a -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a <a href="src/GHC.Core.Type.html#unrestricted" class="link">Source</a> <a href="#v:unrestricted" class="selflink">#</a></p><div class="doc"><p>Scale a payload by Many</p></div></div><div class="top"><p class="src"><a id="v:linear" class="def">linear</a> :: a -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a <a href="src/GHC.Core.Type.html#linear" class="link">Source</a> <a href="#v:linear" class="selflink">#</a></p><div class="doc"><p>Scale a payload by One</p></div></div><div class="top"><p class="src"><a id="v:tymult" class="def">tymult</a> :: a -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a <a href="src/GHC.Core.Type.html#tymult" class="link">Source</a> <a href="#v:tymult" class="selflink">#</a></p><div class="doc"><p>Scale a payload by Many; used for type arguments in core</p></div></div><div class="top"><p class="src"><a id="v:mkScaled" class="def">mkScaled</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; a -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a <a href="src/GHC.Core.Type.html#mkScaled" class="link">Source</a> <a href="#v:mkScaled" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:irrelevantMult" class="def">irrelevantMult</a> :: <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; a <a href="src/GHC.Core.Type.html#irrelevantMult" class="link">Source</a> <a href="#v:irrelevantMult" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:scaledSet" class="def">scaledSet</a> :: <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> a -&gt; b -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> b <a href="src/GHC.Core.Type.html#scaledSet" class="link">Source</a> <a href="#v:scaledSet" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:One" class="def">One</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> <a href="src/GHC.Core.Type.html#One" class="link">Source</a> <a href="#v:One" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:Many" class="def">Many</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> <a href="src/GHC.Core.Type.html#Many" class="link">Source</a> <a href="#v:Many" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isOneDataConTy" class="def">isOneDataConTy</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isOneDataConTy" class="link">Source</a> <a href="#v:isOneDataConTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isManyDataConTy" class="def">isManyDataConTy</a> :: <a href="GHC-Core-Type.html#t:Mult" title="GHC.Core.Type">Mult</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isManyDataConTy" class="link">Source</a> <a href="#v:isManyDataConTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isLinearType" class="def">isLinearType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isLinearType" class="link">Source</a> <a href="#v:isLinearType" class="selflink">#</a></p><div class="doc"><p><code>isLinear t</code> returns <code>True</code> of a if <code>t</code> is a type of (curried) function
 where at least one argument is linear (or otherwise non-unrestricted). We use
 this function to check whether it is safe to eta reduce an Id in CorePrep. It
 is always safe to return <code><a href="GHC-Prelude.html#v:True" title="GHC.Prelude">True</a></code>, because <code><a href="GHC-Prelude.html#v:True" title="GHC.Prelude">True</a></code> deactivates the optimisation.</p></div></div><a href="#g:9" id="g:9"><h1>Main data types representing Kinds</h1></a><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Kind" class="def">Kind</a> = <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Rep.html#Kind" class="link">Source</a> <a href="#t:Kind" class="selflink">#</a></p><div class="doc"><p>The key type representing kinds in the compiler.</p></div></div><a href="#g:10" id="g:10"><h2>Finding the kind of a type</h2></a><div class="top"><p class="src"><a id="v:typeKind" class="def">typeKind</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> <a href="src/GHC.Core.Type.html#typeKind" class="link">Source</a> <a href="#v:typeKind" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tcTypeKind" class="def">tcTypeKind</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> <a href="src/GHC.Core.Type.html#tcTypeKind" class="link">Source</a> <a href="#v:tcTypeKind" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isTypeLevPoly" class="def">isTypeLevPoly</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isTypeLevPoly" class="link">Source</a> <a href="#v:isTypeLevPoly" class="selflink">#</a></p><div class="doc"><p>Returns True if a type is levity polymorphic. Should be the same
 as (isKindLevPoly . typeKind) but much faster.
 Precondition: The type has kind (TYPE blah)</p></div></div><div class="top"><p class="src"><a id="v:resultIsLevPoly" class="def">resultIsLevPoly</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#resultIsLevPoly" class="link">Source</a> <a href="#v:resultIsLevPoly" class="selflink">#</a></p><div class="doc"><p>Looking past all pi-types, is the end result potentially levity polymorphic?
 Example: True for (forall r (a :: TYPE r). String -&gt; a)
 Example: False for (forall r1 r2 (a :: TYPE r1) (b :: TYPE r2). a -&gt; b -&gt; Type)</p></div></div><div class="top"><p class="src"><a id="v:tcIsLiftedTypeKind" class="def">tcIsLiftedTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#tcIsLiftedTypeKind" class="link">Source</a> <a href="#v:tcIsLiftedTypeKind" class="selflink">#</a></p><div class="doc"><p>Is this kind equivalent to <code>*</code>?</p><p>This considers <code>Constraint</code> to be distinct from <code>*</code>. For a version that
 treats them as the same type, see <code><a href="GHC-Core-Type.html#v:isLiftedTypeKind" title="GHC.Core.Type">isLiftedTypeKind</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:tcIsConstraintKind" class="def">tcIsConstraintKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#tcIsConstraintKind" class="link">Source</a> <a href="#v:tcIsConstraintKind" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tcReturnsConstraintKind" class="def">tcReturnsConstraintKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#tcReturnsConstraintKind" class="link">Source</a> <a href="#v:tcReturnsConstraintKind" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tcIsRuntimeTypeKind" class="def">tcIsRuntimeTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#tcIsRuntimeTypeKind" class="link">Source</a> <a href="#v:tcIsRuntimeTypeKind" class="selflink">#</a></p><div class="doc"><p>Is this kind equivalent to <code>TYPE r</code> (for some unknown r)?</p><p>This considers <code>Constraint</code> to be distinct from <code>*</code>.</p></div></div><a href="#g:11" id="g:11"><h2>Common Kind</h2></a><div class="top"><p class="src"><a id="v:liftedTypeKind" class="def">liftedTypeKind</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> <a href="src/GHC.Builtin.Types.html#liftedTypeKind" class="link">Source</a> <a href="#v:liftedTypeKind" class="selflink">#</a></p></div><a href="#g:12" id="g:12"><h1>Type free variables</h1></a><div class="top"><p class="src"><a id="v:tyCoFVsOfType" class="def">tyCoFVsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> <a href="src/GHC.Core.TyCo.FVs.html#tyCoFVsOfType" class="link">Source</a> <a href="#v:tyCoFVsOfType" class="selflink">#</a></p><div class="doc"><p>The worker for <code><a href="GHC-Core-Type.html#v:tyCoFVsOfType" title="GHC.Core.Type">tyCoFVsOfType</a></code> and <code>tyCoFVsOfTypeList</code>.
 The previous implementation used <code><a href="GHC-Types-Var-Set.html#v:unionVarSet" title="GHC.Types.Var.Set">unionVarSet</a></code> which is O(n+m) and can
 make the function quadratic.
 It's exported, so that it can be composed with
 other functions that compute free variables.
 See Note [FV naming conventions] in <a href="GHC-Utils-FV.html">GHC.Utils.FV</a>.</p><p>Eta-expanded because that makes it run faster (apparently)
 See Note [FV eta expansion] in <a href="GHC-Utils-FV.html">GHC.Utils.FV</a> for explanation.</p></div></div><div class="top"><p class="src"><a id="v:tyCoFVsBndr" class="def">tyCoFVsBndr</a> :: <a href="GHC-Core-Type.html#t:TyCoVarBinder" title="GHC.Core.Type">TyCoVarBinder</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> <a href="src/GHC.Core.TyCo.FVs.html#tyCoFVsBndr" class="link">Source</a> <a href="#v:tyCoFVsBndr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyCoFVsVarBndr" class="def">tyCoFVsVarBndr</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> <a href="src/GHC.Core.TyCo.FVs.html#tyCoFVsVarBndr" class="link">Source</a> <a href="#v:tyCoFVsVarBndr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyCoFVsVarBndrs" class="def">tyCoFVsVarBndrs</a> :: [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> -&gt; <a href="GHC-Utils-FV.html#t:FV" title="GHC.Utils.FV">FV</a> <a href="src/GHC.Core.TyCo.FVs.html#tyCoFVsVarBndrs" class="link">Source</a> <a href="#v:tyCoFVsVarBndrs" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyCoVarsOfType" class="def">tyCoVarsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a> <a href="src/GHC.Core.TyCo.FVs.html#tyCoVarsOfType" class="link">Source</a> <a href="#v:tyCoVarsOfType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyCoVarsOfTypes" class="def">tyCoVarsOfTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a> <a href="src/GHC.Core.TyCo.FVs.html#tyCoVarsOfTypes" class="link">Source</a> <a href="#v:tyCoVarsOfTypes" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tyCoVarsOfTypeDSet" class="def">tyCoVarsOfTypeDSet</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Types-Var-Set.html#t:DTyCoVarSet" title="GHC.Types.Var.Set">DTyCoVarSet</a> <a href="src/GHC.Core.TyCo.FVs.html#tyCoVarsOfTypeDSet" class="link">Source</a> <a href="#v:tyCoVarsOfTypeDSet" class="selflink">#</a></p><div class="doc"><p><code><a href="GHC-Core-Type.html#v:tyCoFVsOfType" title="GHC.Core.Type">tyCoFVsOfType</a></code> that returns free variables of a type in a deterministic
 set. For explanation of why using <code><a href="GHC-Types-Var-Set.html#t:VarSet" title="GHC.Types.Var.Set">VarSet</a></code> is not deterministic see
 Note [Deterministic FV] in <a href="GHC-Utils-FV.html">GHC.Utils.FV</a>.</p></div></div><div class="top"><p class="src"><a id="v:coVarsOfType" class="def">coVarsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Types-Var-Set.html#t:CoVarSet" title="GHC.Types.Var.Set">CoVarSet</a> <a href="src/GHC.Core.TyCo.FVs.html#coVarsOfType" class="link">Source</a> <a href="#v:coVarsOfType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:coVarsOfTypes" class="def">coVarsOfTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Types-Var-Set.html#t:CoVarSet" title="GHC.Types.Var.Set">CoVarSet</a> <a href="src/GHC.Core.TyCo.FVs.html#coVarsOfTypes" class="link">Source</a> <a href="#v:coVarsOfTypes" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:noFreeVarsOfType" class="def">noFreeVarsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.TyCo.FVs.html#noFreeVarsOfType" class="link">Source</a> <a href="#v:noFreeVarsOfType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:splitVisVarsOfType" class="def">splitVisVarsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Data-Pair.html#t:Pair" title="GHC.Data.Pair">Pair</a> <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a> <a href="src/GHC.Core.Type.html#splitVisVarsOfType" class="link">Source</a> <a href="#v:splitVisVarsOfType" class="selflink">#</a></p><div class="doc"><p>Retrieve the free variables in this type, splitting them based
 on whether they are used visibly or invisibly. Invisible ones come
 first.</p></div></div><div class="top"><p class="src"><a id="v:splitVisVarsOfTypes" class="def">splitVisVarsOfTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Data-Pair.html#t:Pair" title="GHC.Data.Pair">Pair</a> <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a> <a href="src/GHC.Core.Type.html#splitVisVarsOfTypes" class="link">Source</a> <a href="#v:splitVisVarsOfTypes" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:expandTypeSynonyms" class="def">expandTypeSynonyms</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#expandTypeSynonyms" class="link">Source</a> <a href="#v:expandTypeSynonyms" class="selflink">#</a></p><div class="doc"><p>Expand out all type synonyms.  Actually, it'd suffice to expand out
 just the ones that discard type variables (e.g.  type Funny a = Int)
 But we don't know which those are currently, so we just expand all.</p><p><code><a href="GHC-Core-Type.html#v:expandTypeSynonyms" title="GHC.Core.Type">expandTypeSynonyms</a></code> only expands out type synonyms mentioned in the type,
 not in the kinds of any TyCon or TyVar mentioned in the type.</p><p>Keep this synchronized with <code>synonymTyConsOfType</code></p></div></div><div class="top"><p class="src"><a id="v:typeSize" class="def">typeSize</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Int" title="GHC.Prelude">Int</a> <a href="src/GHC.Core.TyCo.Rep.html#typeSize" class="link">Source</a> <a href="#v:typeSize" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:occCheckExpand" class="def">occCheckExpand</a> :: [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#occCheckExpand" class="link">Source</a> <a href="#v:occCheckExpand" class="selflink">#</a></p></div><a href="#g:13" id="g:13"><h2>Closing over kinds</h2></a><div class="top"><p class="src"><a id="v:closeOverKindsDSet" class="def">closeOverKindsDSet</a> :: <a href="GHC-Types-Var-Set.html#t:DTyVarSet" title="GHC.Types.Var.Set">DTyVarSet</a> -&gt; <a href="GHC-Types-Var-Set.html#t:DTyVarSet" title="GHC.Types.Var.Set">DTyVarSet</a> <a href="src/GHC.Core.TyCo.FVs.html#closeOverKindsDSet" class="link">Source</a> <a href="#v:closeOverKindsDSet" class="selflink">#</a></p><div class="doc"><p>Add the kind variables free in the kinds of the tyvars in the given set.
 Returns a deterministic set.</p></div></div><div class="top"><p class="src"><a id="v:closeOverKindsList" class="def">closeOverKindsList</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] <a href="src/GHC.Core.TyCo.FVs.html#closeOverKindsList" class="link">Source</a> <a href="#v:closeOverKindsList" class="selflink">#</a></p><div class="doc"><p>Add the kind variables free in the kinds of the tyvars in the given set.
 Returns a deterministically ordered list.</p></div></div><div class="top"><p class="src"><a id="v:closeOverKinds" class="def">closeOverKinds</a> :: <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a> -&gt; <a href="GHC-Types-Var-Set.html#t:TyCoVarSet" title="GHC.Types.Var.Set">TyCoVarSet</a> <a href="src/GHC.Core.TyCo.FVs.html#closeOverKinds" class="link">Source</a> <a href="#v:closeOverKinds" class="selflink">#</a></p></div><a href="#g:14" id="g:14"><h1>Well-scoped lists of variables</h1></a><div class="top"><p class="src"><a id="v:scopedSort" class="def">scopedSort</a> :: [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] <a href="src/GHC.Core.TyCo.FVs.html#scopedSort" class="link">Source</a> <a href="#v:scopedSort" class="selflink">#</a></p><div class="doc"><p>Do a topological sort on a list of tyvars,
   so that binders occur before occurrences
 E.g. given  [ a::k, k::*, b::k ]
 it'll return a well-scoped list [ k::*, a::k, b::k ]</p><p>This is a deterministic sorting operation
 (that is, doesn't depend on Uniques).</p><p>It is also meant to be stable: that is, variables should not
 be reordered unnecessarily. This is specified in Note [ScopedSort]
 See also Note [Ordering of implicit variables] in <a href="GHC-Rename-HsType.html">GHC.Rename.HsType</a></p></div></div><div class="top"><p class="src"><a id="v:tyCoVarsOfTypeWellScoped" class="def">tyCoVarsOfTypeWellScoped</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] <a href="src/GHC.Core.TyCo.FVs.html#tyCoVarsOfTypeWellScoped" class="link">Source</a> <a href="#v:tyCoVarsOfTypeWellScoped" class="selflink">#</a></p><div class="doc"><p>Get the free vars of a type in scoped order</p></div></div><div class="top"><p class="src"><a id="v:tyCoVarsOfTypesWellScoped" class="def">tyCoVarsOfTypesWellScoped</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] <a href="src/GHC.Core.TyCo.FVs.html#tyCoVarsOfTypesWellScoped" class="link">Source</a> <a href="#v:tyCoVarsOfTypesWellScoped" class="selflink">#</a></p><div class="doc"><p>Get the free vars of types in scoped order</p></div></div><a href="#g:15" id="g:15"><h1>Type comparison</h1></a><div class="top"><p class="src"><a id="v:eqType" class="def">eqType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#eqType" class="link">Source</a> <a href="#v:eqType" class="selflink">#</a></p><div class="doc"><p>Type equality on source types. Does not look through <code>newtypes</code> or
 <code><a href="GHC-Core-Type.html#t:PredType" title="GHC.Core.Type">PredType</a></code>s, but it does look through type synonyms.
 This first checks that the kinds of the types are equal and then
 checks whether the types are equal, ignoring casts and coercions.
 (The kind check is a recursive call, but since all kinds have type
 <code>Type</code>, there is no need to check the types of kinds.)
 See also Note [Non-trivial definitional equality] in <a href="GHC-Core-TyCo-Rep.html">GHC.Core.TyCo.Rep</a>.</p></div></div><div class="top"><p class="src"><a id="v:eqTypeX" class="def">eqTypeX</a> :: <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#eqTypeX" class="link">Source</a> <a href="#v:eqTypeX" class="selflink">#</a></p><div class="doc"><p>Compare types with respect to a (presumably) non-empty <code><a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:eqTypes" class="def">eqTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#eqTypes" class="link">Source</a> <a href="#v:eqTypes" class="selflink">#</a></p><div class="doc"><p>Type equality on lists of types, looking through type synonyms
 but not newtypes.</p></div></div><div class="top"><p class="src"><a id="v:nonDetCmpType" class="def">nonDetCmpType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a> <a href="src/GHC.Core.Type.html#nonDetCmpType" class="link">Source</a> <a href="#v:nonDetCmpType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:nonDetCmpTypes" class="def">nonDetCmpTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a> <a href="src/GHC.Core.Type.html#nonDetCmpTypes" class="link">Source</a> <a href="#v:nonDetCmpTypes" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:nonDetCmpTypeX" class="def">nonDetCmpTypeX</a> :: <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a> <a href="src/GHC.Core.Type.html#nonDetCmpTypeX" class="link">Source</a> <a href="#v:nonDetCmpTypeX" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:nonDetCmpTypesX" class="def">nonDetCmpTypesX</a> :: <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a> <a href="src/GHC.Core.Type.html#nonDetCmpTypesX" class="link">Source</a> <a href="#v:nonDetCmpTypesX" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:nonDetCmpTc" class="def">nonDetCmpTc</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Prelude.html#t:Ordering" title="GHC.Prelude">Ordering</a> <a href="src/GHC.Core.Type.html#nonDetCmpTc" class="link">Source</a> <a href="#v:nonDetCmpTc" class="selflink">#</a></p><div class="doc"><p>Compare two <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code>s. NB: This should <em>never</em> see <code>Constraint</code> (as
 recognized by Kind.isConstraintKindCon) which is considered a synonym for
 <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code> in Core.
 See Note [Kind Constraint and kind Type] in <a href="GHC-Core-Type.html">GHC.Core.Type</a>.
 See Note [nonDetCmpType nondeterminism]</p></div></div><div class="top"><p class="src"><a id="v:eqVarBndrs" class="def">eqVarBndrs</a> :: <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a> -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Types-Var-Env.html#t:RnEnv2" title="GHC.Types.Var.Env">RnEnv2</a> <a href="src/GHC.Core.Type.html#eqVarBndrs" class="link">Source</a> <a href="#v:eqVarBndrs" class="selflink">#</a></p></div><a href="#g:16" id="g:16"><h1>Forcing evaluation of types</h1></a><div class="top"><p class="src"><a id="v:seqType" class="def">seqType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; () <a href="src/GHC.Core.Type.html#seqType" class="link">Source</a> <a href="#v:seqType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:seqTypes" class="def">seqTypes</a> :: [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; () <a href="src/GHC.Core.Type.html#seqTypes" class="link">Source</a> <a href="#v:seqTypes" class="selflink">#</a></p></div><a href="#g:17" id="g:17"><h1>Other views onto Types</h1></a><div class="top"><p class="src"><a id="v:coreView" class="def">coreView</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#coreView" class="link">Source</a> <a href="#v:coreView" class="selflink">#</a></p><div class="doc"><p>This function Strips off the <em>top layer only</em> of a type synonym
 application (if any) its underlying representation type.
 Returns Nothing if there is nothing to look through.
 This function considers <code>Constraint</code> to be a synonym of <code>TYPE LiftedRep</code>.</p><p>By being non-recursive and inlined, this case analysis gets efficiently
 joined onto the case analysis that the caller is already doing</p></div></div><div class="top"><p class="src"><a id="v:tcView" class="def">tcView</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.Type.html#tcView" class="link">Source</a> <a href="#v:tcView" class="selflink">#</a></p><div class="doc"><p>Gives the typechecker view of a type. This unwraps synonyms but
 leaves <code>Constraint</code> alone. c.f. coreView, which turns Constraint into
 TYPE LiftedRep. Returns Nothing if no unwrapping happens.
 See also Note [coreView vs tcView]</p></div></div><div class="top"><p class="src"><a id="v:tyConsOfType" class="def">tyConsOfType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Types-Unique-Set.html#t:UniqSet" title="GHC.Types.Unique.Set">UniqSet</a> <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> <a href="src/GHC.Core.Type.html#tyConsOfType" class="link">Source</a> <a href="#v:tyConsOfType" class="selflink">#</a></p><div class="doc"><p>All type constructors occurring in the type; looking through type
   synonyms, but not newtypes.
  When it finds a Class, it returns the class TyCon.</p></div></div><a href="#g:18" id="g:18"><h1>Main type substitution data types</h1></a><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:TvSubstEnv" class="def">TvSubstEnv</a> = <a href="GHC-Types-Var-Env.html#t:TyVarEnv" title="GHC.Types.Var.Env">TyVarEnv</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#TvSubstEnv" class="link">Source</a> <a href="#t:TvSubstEnv" class="selflink">#</a></p><div class="doc"><p>A substitution of <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code>s for <code><a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a></code>s
                 and <code><a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a></code>s for <code><a href="GHC-Types-Var.html#t:KindVar" title="GHC.Types.Var">KindVar</a></code>s</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:TCvSubst" class="def">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#TCvSubst" class="link">Source</a> <a href="#t:TCvSubst" class="selflink">#</a></p><div class="doc"><p>Type &amp; coercion substitution</p><p><a id="tcvsubst_invariant"></a>
 The following invariants must hold of a <code><a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></code>:</p><ol><li>The in-scope set is needed <em>only</em> to
 guide the generation of fresh uniques</li><li>In particular, the <em>kind</em> of the type variables in
 the in-scope set is not relevant</li><li>The substitution is only applied ONCE! This is because
 in general such application will not reach a fixed point.</li></ol></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:TCvSubst" class="def">TCvSubst</a> <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a> <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a> <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:TCvSubst">Instances</h4><details id="i:TCvSubst" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:TCvSubst:Outputable:1"></span> <a href="GHC-Utils-Outputable.html#t:Outputable" title="GHC.Utils.Outputable">Outputable</a> <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></span> <a href="src/GHC.Core.TyCo.Subst.html#line-464" class="link">Source</a> <a href="#t:TCvSubst" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:TCvSubst:Outputable:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="GHC-Core-TyCo-Subst.html">GHC.Core.TyCo.Subst</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ppr">ppr</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#ppr" class="link">Source</a> <a href="#v:ppr" class="selflink">#</a></p><p class="src"><a href="#v:pprPrec">pprPrec</a> :: <a href="GHC-Prelude.html#t:Rational" title="GHC.Prelude">Rational</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Utils-Outputable.html#t:SDoc" title="GHC.Utils.Outputable">SDoc</a> <a href="src/GHC.Utils.Outputable.html#pprPrec" class="link">Source</a> <a href="#v:pprPrec" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><a href="#g:19" id="g:19"><h2>Manipulating type substitutions</h2></a><div class="top"><p class="src"><a id="v:emptyTvSubstEnv" class="def">emptyTvSubstEnv</a> :: <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a> <a href="src/GHC.Core.TyCo.Subst.html#emptyTvSubstEnv" class="link">Source</a> <a href="#v:emptyTvSubstEnv" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:emptyTCvSubst" class="def">emptyTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#emptyTCvSubst" class="link">Source</a> <a href="#v:emptyTCvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mkEmptyTCvSubst" class="def">mkEmptyTCvSubst</a> :: <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#mkEmptyTCvSubst" class="link">Source</a> <a href="#v:mkEmptyTCvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mkTCvSubst" class="def">mkTCvSubst</a> :: <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a> -&gt; (<a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a>, <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a>) -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#mkTCvSubst" class="link">Source</a> <a href="#v:mkTCvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:zipTvSubst" class="def">zipTvSubst</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#zipTvSubst" class="link">Source</a> <a href="#v:zipTvSubst" class="selflink">#</a></p><div class="doc"><p>Generates the in-scope set for the <code><a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></code> from the types in the incoming
 environment. No CoVars, please!</p></div></div><div class="top"><p class="src"><a id="v:mkTvSubstPrs" class="def">mkTvSubstPrs</a> :: [(<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>)] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#mkTvSubstPrs" class="link">Source</a> <a href="#v:mkTvSubstPrs" class="selflink">#</a></p><div class="doc"><p>Generates the in-scope set for the <code><a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a></code> from the types in the
 incoming environment. No CoVars, please!</p></div></div><div class="top"><p class="src"><a id="v:zipTCvSubst" class="def">zipTCvSubst</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#zipTCvSubst" class="link">Source</a> <a href="#v:zipTCvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:notElemTCvSubst" class="def">notElemTCvSubst</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.TyCo.Subst.html#notElemTCvSubst" class="link">Source</a> <a href="#v:notElemTCvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getTvSubstEnv" class="def">getTvSubstEnv</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a> <a href="src/GHC.Core.TyCo.Subst.html#getTvSubstEnv" class="link">Source</a> <a href="#v:getTvSubstEnv" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:setTvSubstEnv" class="def">setTvSubstEnv</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#setTvSubstEnv" class="link">Source</a> <a href="#v:setTvSubstEnv" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:zapTCvSubst" class="def">zapTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#zapTCvSubst" class="link">Source</a> <a href="#v:zapTCvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getTCvInScope" class="def">getTCvInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a> <a href="src/GHC.Core.TyCo.Subst.html#getTCvInScope" class="link">Source</a> <a href="#v:getTCvInScope" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getTCvSubstRangeFVs" class="def">getTCvSubstRangeFVs</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Types-Var-Set.html#t:VarSet" title="GHC.Types.Var.Set">VarSet</a> <a href="src/GHC.Core.TyCo.Subst.html#getTCvSubstRangeFVs" class="link">Source</a> <a href="#v:getTCvSubstRangeFVs" class="selflink">#</a></p><div class="doc"><p>Returns the free variables of the types in the range of a substitution as
 a non-deterministic set.</p></div></div><div class="top"><p class="src"><a id="v:extendTCvInScope" class="def">extendTCvInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTCvInScope" class="link">Source</a> <a href="#v:extendTCvInScope" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTCvInScopeList" class="def">extendTCvInScopeList</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTCvInScopeList" class="link">Source</a> <a href="#v:extendTCvInScopeList" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTCvInScopeSet" class="def">extendTCvInScopeSet</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Types-Var-Set.html#t:VarSet" title="GHC.Types.Var.Set">VarSet</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTCvInScopeSet" class="link">Source</a> <a href="#v:extendTCvInScopeSet" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTCvSubst" class="def">extendTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTCvSubst" class="link">Source</a> <a href="#v:extendTCvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendCvSubst" class="def">extendCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Types-Var.html#t:CoVar" title="GHC.Types.Var">CoVar</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendCvSubst" class="link">Source</a> <a href="#v:extendCvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTvSubst" class="def">extendTvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTvSubst" class="link">Source</a> <a href="#v:extendTvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTvSubstBinderAndInScope" class="def">extendTvSubstBinderAndInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoBinder" title="GHC.Core.Type">TyCoBinder</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTvSubstBinderAndInScope" class="link">Source</a> <a href="#v:extendTvSubstBinderAndInScope" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTvSubstList" class="def">extendTvSubstList</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTvSubstList" class="link">Source</a> <a href="#v:extendTvSubstList" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTvSubstAndInScope" class="def">extendTvSubstAndInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTvSubstAndInScope" class="link">Source</a> <a href="#v:extendTvSubstAndInScope" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTCvSubstList" class="def">extendTCvSubstList</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTCvSubstList" class="link">Source</a> <a href="#v:extendTCvSubstList" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTvSubstWithClone" class="def">extendTvSubstWithClone</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTvSubstWithClone" class="link">Source</a> <a href="#v:extendTvSubstWithClone" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:extendTCvSubstWithClone" class="def">extendTCvSubstWithClone</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#extendTCvSubstWithClone" class="link">Source</a> <a href="#v:extendTCvSubstWithClone" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isInScope" class="def">isInScope</a> :: <a href="GHC-Core-Type.html#t:Var" title="GHC.Core.Type">Var</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.TyCo.Subst.html#isInScope" class="link">Source</a> <a href="#v:isInScope" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:composeTCvSubstEnv" class="def">composeTCvSubstEnv</a> :: <a href="GHC-Types-Var-Env.html#t:InScopeSet" title="GHC.Types.Var.Env">InScopeSet</a> -&gt; (<a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a>, <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a>) -&gt; (<a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a>, <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a>) -&gt; (<a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a>, <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a>) <a href="src/GHC.Core.TyCo.Subst.html#composeTCvSubstEnv" class="link">Source</a> <a href="#v:composeTCvSubstEnv" class="selflink">#</a></p><div class="doc"><p><code>(compose env1 env2)(x)</code> is <code>env1(env2(x))</code>; i.e. apply <code>env2</code> then <code>env1</code>.
 It assumes that both are idempotent.
 Typically, <code>env1</code> is the refinement to a base substitution <code>env2</code></p></div></div><div class="top"><p class="src"><a id="v:composeTCvSubst" class="def">composeTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#composeTCvSubst" class="link">Source</a> <a href="#v:composeTCvSubst" class="selflink">#</a></p><div class="doc"><p>Composes two substitutions, applying the second one provided first,
 like in function composition.</p></div></div><div class="top"><p class="src"><a id="v:zipTyEnv" class="def">zipTyEnv</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:TvSubstEnv" title="GHC.Core.Type">TvSubstEnv</a> <a href="src/GHC.Core.TyCo.Subst.html#zipTyEnv" class="link">Source</a> <a href="#v:zipTyEnv" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:zipCoEnv" class="def">zipCoEnv</a> :: <a href="GHC-Utils-Misc.html#t:HasDebugCallStack" title="GHC.Utils.Misc">HasDebugCallStack</a> =&gt; [<a href="GHC-Types-Var.html#t:CoVar" title="GHC.Types.Var">CoVar</a>] -&gt; [<a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a>] -&gt; <a href="GHC-Core-Coercion.html#t:CvSubstEnv" title="GHC.Core.Coercion">CvSubstEnv</a> <a href="src/GHC.Core.TyCo.Subst.html#zipCoEnv" class="link">Source</a> <a href="#v:zipCoEnv" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isEmptyTCvSubst" class="def">isEmptyTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.TyCo.Subst.html#isEmptyTCvSubst" class="link">Source</a> <a href="#v:isEmptyTCvSubst" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:unionTCvSubst" class="def">unionTCvSubst</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> <a href="src/GHC.Core.TyCo.Subst.html#unionTCvSubst" class="link">Source</a> <a href="#v:unionTCvSubst" class="selflink">#</a></p></div><a href="#g:20" id="g:20"><h2>Performing substitution on types and kinds</h2></a><div class="top"><p class="src"><a id="v:substTy" class="def">substTy</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#substTy" class="link">Source</a> <a href="#v:substTy" class="selflink">#</a></p><div class="doc"><p>Substitute within a <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code>
 The substitution has to satisfy the invariants described in
 Note [The substitution invariant].</p></div></div><div class="top"><p class="src"><a id="v:substTys" class="def">substTys</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.TyCo.Subst.html#substTys" class="link">Source</a> <a href="#v:substTys" class="selflink">#</a></p><div class="doc"><p>Substitute within several <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code>s
 The substitution has to satisfy the invariants described in
 Note [The substitution invariant].</p></div></div><div class="top"><p class="src"><a id="v:substScaledTy" class="def">substScaledTy</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#substScaledTy" class="link">Source</a> <a href="#v:substScaledTy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:substScaledTys" class="def">substScaledTys</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.TyCo.Subst.html#substScaledTys" class="link">Source</a> <a href="#v:substScaledTys" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:substTyWith" class="def">substTyWith</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#substTyWith" class="link">Source</a> <a href="#v:substTyWith" class="selflink">#</a></p><div class="doc"><p>Type substitution, see <code><a href="GHC-Core-Type.html#v:zipTvSubst" title="GHC.Core.Type">zipTvSubst</a></code></p></div></div><div class="top"><p class="src"><a id="v:substTysWith" class="def">substTysWith</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.TyCo.Subst.html#substTysWith" class="link">Source</a> <a href="#v:substTysWith" class="selflink">#</a></p><div class="doc"><p>Type substitution, see <code><a href="GHC-Core-Type.html#v:zipTvSubst" title="GHC.Core.Type">zipTvSubst</a></code></p></div></div><div class="top"><p class="src"><a id="v:substTheta" class="def">substTheta</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a> -&gt; <a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a> <a href="src/GHC.Core.TyCo.Subst.html#substTheta" class="link">Source</a> <a href="#v:substTheta" class="selflink">#</a></p><div class="doc"><p>Substitute within a <code><a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a></code>
 The substitution has to satisfy the invariants described in
 Note [The substitution invariant].</p></div></div><div class="top"><p class="src"><a id="v:substTyAddInScope" class="def">substTyAddInScope</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#substTyAddInScope" class="link">Source</a> <a href="#v:substTyAddInScope" class="selflink">#</a></p><div class="doc"><p>Substitute within a <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code> after adding the free variables of the type
 to the in-scope set. This is useful for the case when the free variables
 aren't already in the in-scope set or easily available.
 See also Note [The substitution invariant].</p></div></div><div class="top"><p class="src"><a id="v:substTyUnchecked" class="def">substTyUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#substTyUnchecked" class="link">Source</a> <a href="#v:substTyUnchecked" class="selflink">#</a></p><div class="doc"><p>Substitute within a <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code> disabling the sanity checks.
 The problems that the sanity checks in substTy catch are described in
 Note [The substitution invariant].
 The goal of #11371 is to migrate all the calls of substTyUnchecked to
 substTy and remove this function. Please don't use in new code.</p></div></div><div class="top"><p class="src"><a id="v:substTysUnchecked" class="def">substTysUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.TyCo.Subst.html#substTysUnchecked" class="link">Source</a> <a href="#v:substTysUnchecked" class="selflink">#</a></p><div class="doc"><p>Substitute within several <code><a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a></code>s disabling the sanity checks.
 The problems that the sanity checks in substTys catch are described in
 Note [The substitution invariant].
 The goal of #11371 is to migrate all the calls of substTysUnchecked to
 substTys and remove this function. Please don't use in new code.</p></div></div><div class="top"><p class="src"><a id="v:substScaledTyUnchecked" class="def">substScaledTyUnchecked</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#substScaledTyUnchecked" class="link">Source</a> <a href="#v:substScaledTyUnchecked" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:substScaledTysUnchecked" class="def">substScaledTysUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Scaled" title="GHC.Core.Type">Scaled</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.TyCo.Subst.html#substScaledTysUnchecked" class="link">Source</a> <a href="#v:substScaledTysUnchecked" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:substThetaUnchecked" class="def">substThetaUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a> -&gt; <a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a> <a href="src/GHC.Core.TyCo.Subst.html#substThetaUnchecked" class="link">Source</a> <a href="#v:substThetaUnchecked" class="selflink">#</a></p><div class="doc"><p>Substitute within a <code><a href="GHC-Core-Type.html#t:ThetaType" title="GHC.Core.Type">ThetaType</a></code> disabling the sanity checks.
 The problems that the sanity checks in substTys catch are described in
 Note [The substitution invariant].
 The goal of #11371 is to migrate all the calls of substThetaUnchecked to
 substTheta and remove this function. Please don't use in new code.</p></div></div><div class="top"><p class="src"><a id="v:substTyWithUnchecked" class="def">substTyWithUnchecked</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#substTyWithUnchecked" class="link">Source</a> <a href="#v:substTyWithUnchecked" class="selflink">#</a></p><div class="doc"><p>Type substitution, see <code><a href="GHC-Core-Type.html#v:zipTvSubst" title="GHC.Core.Type">zipTvSubst</a></code>. Disables sanity checks.
 The problems that the sanity checks in substTy catch are described in
 Note [The substitution invariant].
 The goal of #11371 is to migrate all the calls of substTyUnchecked to
 substTy and remove this function. Please don't use in new code.</p></div></div><div class="top"><p class="src"><a id="v:substCoUnchecked" class="def">substCoUnchecked</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> <a href="src/GHC.Core.TyCo.Subst.html#substCoUnchecked" class="link">Source</a> <a href="#v:substCoUnchecked" class="selflink">#</a></p><div class="doc"><p>Substitute within a <code><a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a></code> disabling sanity checks.
 The problems that the sanity checks in substCo catch are described in
 Note [The substitution invariant].
 The goal of #11371 is to migrate all the calls of substCoUnchecked to
 substCo and remove this function. Please don't use in new code.</p></div></div><div class="top"><p class="src"><a id="v:substCoWithUnchecked" class="def">substCoWithUnchecked</a> :: [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> -&gt; <a href="GHC-Core-Coercion.html#t:Coercion" title="GHC.Core.Coercion">Coercion</a> <a href="src/GHC.Core.TyCo.Subst.html#substCoWithUnchecked" class="link">Source</a> <a href="#v:substCoWithUnchecked" class="selflink">#</a></p><div class="doc"><p>Coercion substitution, see <code><a href="GHC-Core-Type.html#v:zipTvSubst" title="GHC.Core.Type">zipTvSubst</a></code>. Disables sanity checks.
 The problems that the sanity checks in substCo catch are described in
 Note [The substitution invariant].
 The goal of #11371 is to migrate all the calls of substCoUnchecked to
 substCo and remove this function. Please don't use in new code.</p></div></div><div class="top"><p class="src"><a id="v:substTyVarBndr" class="def">substTyVarBndr</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>) <a href="src/GHC.Core.TyCo.Subst.html#substTyVarBndr" class="link">Source</a> <a href="#v:substTyVarBndr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:substTyVarBndrs" class="def">substTyVarBndrs</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>]) <a href="src/GHC.Core.TyCo.Subst.html#substTyVarBndrs" class="link">Source</a> <a href="#v:substTyVarBndrs" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:substTyVar" class="def">substTyVar</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#substTyVar" class="link">Source</a> <a href="#v:substTyVar" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:substTyVars" class="def">substTyVars</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.TyCo.Subst.html#substTyVars" class="link">Source</a> <a href="#v:substTyVars" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:substVarBndr" class="def">substVarBndr</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>) <a href="src/GHC.Core.TyCo.Subst.html#substVarBndr" class="link">Source</a> <a href="#v:substVarBndr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:substVarBndrs" class="def">substVarBndrs</a> :: <a href="GHC-Utils-Misc.html#t:HasCallStack" title="GHC.Utils.Misc">HasCallStack</a> =&gt; <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>]) <a href="src/GHC.Core.TyCo.Subst.html#substVarBndrs" class="link">Source</a> <a href="#v:substVarBndrs" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:cloneTyVarBndr" class="def">cloneTyVarBndr</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Types-Unique.html#t:Unique" title="GHC.Types.Unique">Unique</a> -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>) <a href="src/GHC.Core.TyCo.Subst.html#cloneTyVarBndr" class="link">Source</a> <a href="#v:cloneTyVarBndr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:cloneTyVarBndrs" class="def">cloneTyVarBndrs</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>] -&gt; <a href="GHC-Types-Unique-Supply.html#t:UniqSupply" title="GHC.Types.Unique.Supply">UniqSupply</a> -&gt; (<a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a>, [<a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a>]) <a href="src/GHC.Core.TyCo.Subst.html#cloneTyVarBndrs" class="link">Source</a> <a href="#v:cloneTyVarBndrs" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:lookupTyVar" class="def">lookupTyVar</a> :: <a href="GHC-Core-Type.html#t:TCvSubst" title="GHC.Core.Type">TCvSubst</a> -&gt; <a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a> -&gt; <a href="GHC-Prelude.html#t:Maybe" title="GHC.Prelude">Maybe</a> <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Subst.html#lookupTyVar" class="link">Source</a> <a href="#v:lookupTyVar" class="selflink">#</a></p></div><a href="#g:21" id="g:21"><h1>Tidying type related things up for printing</h1></a><div class="top"><p class="src"><a id="v:tidyType" class="def">tidyType</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Tidy.html#tidyType" class="link">Source</a> <a href="#v:tidyType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tidyTypes" class="def">tidyTypes</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] <a href="src/GHC.Core.TyCo.Tidy.html#tidyTypes" class="link">Source</a> <a href="#v:tidyTypes" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tidyOpenType" class="def">tidyOpenType</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>) <a href="src/GHC.Core.TyCo.Tidy.html#tidyOpenType" class="link">Source</a> <a href="#v:tidyOpenType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tidyOpenTypes" class="def">tidyOpenTypes</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>] -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, [<a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a>]) <a href="src/GHC.Core.TyCo.Tidy.html#tidyOpenTypes" class="link">Source</a> <a href="#v:tidyOpenTypes" class="selflink">#</a></p><div class="doc"><p>Grabs the free type variables, tidies them
 and then uses <code><a href="GHC-Core-Type.html#v:tidyType" title="GHC.Core.Type">tidyType</a></code> to work over the type itself</p></div></div><div class="top"><p class="src"><a id="v:tidyOpenKind" class="def">tidyOpenKind</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a>) <a href="src/GHC.Core.TyCo.Tidy.html#tidyOpenKind" class="link">Source</a> <a href="#v:tidyOpenKind" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tidyVarBndr" class="def">tidyVarBndr</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>) <a href="src/GHC.Core.TyCo.Tidy.html#tidyVarBndr" class="link">Source</a> <a href="#v:tidyVarBndr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tidyVarBndrs" class="def">tidyVarBndrs</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>]) <a href="src/GHC.Core.TyCo.Tidy.html#tidyVarBndrs" class="link">Source</a> <a href="#v:tidyVarBndrs" class="selflink">#</a></p><div class="doc"><p>This tidies up a type for printing in an error message, or in
 an interface file.</p><p>It doesn't change the uniques at all, just the print names.</p></div></div><div class="top"><p class="src"><a id="v:tidyFreeTyCoVars" class="def">tidyFreeTyCoVars</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> <a href="src/GHC.Core.TyCo.Tidy.html#tidyFreeTyCoVars" class="link">Source</a> <a href="#v:tidyFreeTyCoVars" class="selflink">#</a></p><div class="doc"><p>Add the free <code><a href="GHC-Core-Type.html#t:TyVar" title="GHC.Core.Type">TyVar</a></code>s to the env in tidy form,
 so that we can tidy the type they are free in</p></div></div><div class="top"><p class="src"><a id="v:tidyOpenTyCoVar" class="def">tidyOpenTyCoVar</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>) <a href="src/GHC.Core.TyCo.Tidy.html#tidyOpenTyCoVar" class="link">Source</a> <a href="#v:tidyOpenTyCoVar" class="selflink">#</a></p><div class="doc"><p>Treat a new <code><a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a></code> as a binder, and give it a fresh tidy name
 using the environment if one has not already been allocated. See
 also <code><a href="GHC-Core-Type.html#v:tidyVarBndr" title="GHC.Core.Type">tidyVarBndr</a></code></p></div></div><div class="top"><p class="src"><a id="v:tidyOpenTyCoVars" class="def">tidyOpenTyCoVars</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>] -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, [<a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a>]) <a href="src/GHC.Core.TyCo.Tidy.html#tidyOpenTyCoVars" class="link">Source</a> <a href="#v:tidyOpenTyCoVars" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tidyTyCoVarOcc" class="def">tidyTyCoVarOcc</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> -&gt; <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> <a href="src/GHC.Core.TyCo.Tidy.html#tidyTyCoVarOcc" class="link">Source</a> <a href="#v:tidyTyCoVarOcc" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tidyTopType" class="def">tidyTopType</a> :: <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> -&gt; <a href="GHC-Core-Type.html#t:Type" title="GHC.Core.Type">Type</a> <a href="src/GHC.Core.TyCo.Tidy.html#tidyTopType" class="link">Source</a> <a href="#v:tidyTopType" class="selflink">#</a></p><div class="doc"><p>Calls <code><a href="GHC-Core-Type.html#v:tidyType" title="GHC.Core.Type">tidyType</a></code> on a top-level type (i.e. with an empty tidying environment)</p></div></div><div class="top"><p class="src"><a id="v:tidyKind" class="def">tidyKind</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> <a href="src/GHC.Core.TyCo.Tidy.html#tidyKind" class="link">Source</a> <a href="#v:tidyKind" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tidyTyCoVarBinder" class="def">tidyTyCoVarBinder</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, <a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis) <a href="src/GHC.Core.TyCo.Tidy.html#tidyTyCoVarBinder" class="link">Source</a> <a href="#v:tidyTyCoVarBinder" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:tidyTyCoVarBinders" class="def">tidyTyCoVarBinders</a> :: <a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a> -&gt; [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis] -&gt; (<a href="GHC-Types-Var-Env.html#t:TidyEnv" title="GHC.Types.Var.Env">TidyEnv</a>, [<a href="GHC-Types-Var.html#t:VarBndr" title="GHC.Types.Var">VarBndr</a> <a href="GHC-Core-Type.html#t:TyCoVar" title="GHC.Core.Type">TyCoVar</a> vis]) <a href="src/GHC.Core.TyCo.Tidy.html#tidyTyCoVarBinders" class="link">Source</a> <a href="#v:tidyTyCoVarBinders" class="selflink">#</a></p></div><a href="#g:22" id="g:22"><h1>Kinds</h1></a><div class="top"><p class="src"><a id="v:isConstraintKindCon" class="def">isConstraintKindCon</a> :: <a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.TyCon.html#isConstraintKindCon" class="link">Source</a> <a href="#v:isConstraintKindCon" class="selflink">#</a></p><div class="doc"><p>Returns <code>True</code> for the <code><a href="GHC-Core-TyCon.html#t:TyCon" title="GHC.Core.TyCon">TyCon</a></code> of the <code>Constraint</code> kind.</p></div></div><div class="top"><p class="src"><a id="v:classifiesTypeWithValues" class="def">classifiesTypeWithValues</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#classifiesTypeWithValues" class="link">Source</a> <a href="#v:classifiesTypeWithValues" class="selflink">#</a></p><div class="doc"><p>Does this classify a type allowed to have values? Responds True to things
 like *, #, TYPE Lifted, TYPE v, Constraint.</p><p>True of any sub-kind of OpenTypeKind</p></div></div><div class="top"><p class="src"><a id="v:isKindLevPoly" class="def">isKindLevPoly</a> :: <a href="GHC-Core-Type.html#t:Kind" title="GHC.Core.Type">Kind</a> -&gt; <a href="GHC-Prelude.html#t:Bool" title="GHC.Prelude">Bool</a> <a href="src/GHC.Core.Type.html#isKindLevPoly" class="link">Source</a> <a href="#v:isKindLevPoly" class="selflink">#</a></p><div class="doc"><p>Tests whether the given kind (which should look like <code>TYPE x</code>)
 is something other than a constructor tree (that is, constructors at every node).
 E.g.  True of   TYPE k, TYPE (F Int)
       False of  TYPE 'LiftedRep</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.25.1</p></div></body></html>